diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-28 19:37:01 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-28 19:37:01 +0000 |
commit | 8b6ed6c477771e42d43ea0684e5139cf361b6cee (patch) | |
tree | 38c0db7b9d53e8ffb52f4ffaea05fdebbb248530 /core/controllers | |
parent | 1b1d3852949a39765a4c58df3bcbc9cd5a28e00e (diff) |
Create module::event() which runs Gallery events. It works by
convention. To respond to the "photo_created" event in the gmaps
module, you create modules/gmaps/helpers/gmaps_event.php containing
class gmaps_event which has function photo_created.
Renamed all events from gallery.foo.bar to foo_bar
Updated tag module to use new convention.
Diffstat (limited to 'core/controllers')
-rw-r--r-- | core/controllers/items.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/controllers/items.php b/core/controllers/items.php index fd5e337d..26b55492 100644 --- a/core/controllers/items.php +++ b/core/controllers/items.php @@ -102,7 +102,7 @@ class Items_Controller extends REST_Controller { $item->delete(); } - Event::run("gallery.{$item->type}.deleted", $item); + module::event("{$item->type}_deleted", $item); url::redirect("{$parent->type}s/{$parent->id}"); } @@ -135,7 +135,7 @@ class Items_Controller extends REST_Controller { $item->save(); - Event::run("gallery.{$item->type}.changed", $item); + module::event("{$item->type}_changed", $item); if (array_key_exists("_return", $post)) { print $item->{$post["_return"]}; |