summaryrefslogtreecommitdiff
path: root/modules/organize/controllers/organize.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-07-16 12:29:16 -0700
committerBharat Mediratta <bharat@menalto.com>2009-07-16 12:31:40 -0700
commit0f766b149d0cee7af664f2321fddc6f04cda70ac (patch)
tree51d8cd4e26df82955d57eefaa46349568d054126 /modules/organize/controllers/organize.php
parent43324fd12a23b35707300ff110f207552c3811f1 (diff)
Second non-trivial change to the event code. We now publish model
related events from within the model handling code. The only exception to this currently is item_created which is challenging because we have to save the item using ORM_MPTT::add_to_parent() before the object itself is fully set up. When we get that down to one call to save() we can publish that event from within the model also.
Diffstat (limited to 'modules/organize/controllers/organize.php')
-rw-r--r--modules/organize/controllers/organize.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php
index 54e04071..27852904 100644
--- a/modules/organize/controllers/organize.php
+++ b/modules/organize/controllers/organize.php
@@ -279,8 +279,6 @@ class Organize_Controller extends Controller {
$item->rename($form->dirname->value);
$item->save();
- module::event("item_updated", $item);
-
if ($item->is_album()) {
log::success("content", "Updated album", "<a href=\"albums/$item->id\">view</a>");
$message = t("Saved album %album_title", array("album_title" => p::purify($item->title)));
@@ -322,8 +320,6 @@ class Organize_Controller extends Controller {
$item->sort_order = $form->direction->value;
$item->save();
- module::event("item_updated", $item);
-
log::success("content", "Updated album", "<a href=\"albums/$item->id\">view</a>");
$message = t("Saved album %album_title", array("album_title" => p::purify($item->title)));
print json_encode(array("form" => $form->__toString(), "message" => $message));