summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-11-28 00:51:38 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-11-28 00:51:38 +0000
commit828f23896f820f826b803b35c506f8e764504a18 (patch)
tree89e0a448eddf08dd541a9dfef3337c6e22425479 /core
parent3ad9b6174a0adcc3d9b6e4ae007bd3ffd8ef2d26 (diff)
Rename item events and create events for comment create, login, logout, user creation. I probably forgot some, but its a start.
Diffstat (limited to 'core')
-rw-r--r--core/controllers/items.php6
-rw-r--r--core/helpers/album.php2
-rw-r--r--core/helpers/photo.php2
3 files changed, 8 insertions, 2 deletions
diff --git a/core/controllers/items.php b/core/controllers/items.php
index 13071843..fd5e337d 100644
--- a/core/controllers/items.php
+++ b/core/controllers/items.php
@@ -101,6 +101,9 @@ class Items_Controller extends REST_Controller {
if ($parent->id) {
$item->delete();
}
+
+ Event::run("gallery.{$item->type}.deleted", $item);
+
url::redirect("{$parent->type}s/{$parent->id}");
}
@@ -131,6 +134,9 @@ class Items_Controller extends REST_Controller {
// parent_id, owner_id
$item->save();
+
+ Event::run("gallery.{$item->type}.changed", $item);
+
if (array_key_exists("_return", $post)) {
print $item->{$post["_return"]};
}
diff --git a/core/helpers/album.php b/core/helpers/album.php
index e2163b4c..70f5222a 100644
--- a/core/helpers/album.php
+++ b/core/helpers/album.php
@@ -54,7 +54,7 @@ class album_Core {
mkdir($thumbnail_dir);
}
- Event::run("gallery.album_created", $photo);
+ Event::run("gallery.album.created", $photo);
return $album;
}
diff --git a/core/helpers/photo.php b/core/helpers/photo.php
index 900322d2..05fb2fb1 100644
--- a/core/helpers/photo.php
+++ b/core/helpers/photo.php
@@ -78,7 +78,7 @@ class photo_Core {
->set_resize($filename, 640, 480)
->save();
- Event::run("gallery.photo_created", $photo);
+ Event::run("gallery.photo.created", $photo);
return $result;
}