diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-01-08 02:39:21 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-08 02:39:21 +0000 |
| commit | 8620c3fa01cb37506976a944f151d3058b587062 (patch) | |
| tree | cf89ff7567a1c88620957aa645a3d22f297d328a /core/controllers/photos.php | |
| parent | 7bd5105f333f12d66add91b6f8a19e42323b03f2 (diff) | |
Update event calls to take the orig and new models so that event listeners can do comparisons
Diffstat (limited to 'core/controllers/photos.php')
| -rw-r--r-- | core/controllers/photos.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/controllers/photos.php b/core/controllers/photos.php index d59ce26d..6b5e84ba 100644 --- a/core/controllers/photos.php +++ b/core/controllers/photos.php @@ -73,11 +73,12 @@ class Photos_Controller extends Items_Controller { // @todo implement changing the name. This is not trivial, we have // to check for conflicts and rename the album itself, etc. Needs an // api method. + $orig = clone $photo; $photo->title = $form->edit_photo->title->value; $photo->description = $form->edit_photo->description->value; $photo->save(); - module::event("photo_changed", $photo); + module::event("photo_changed", $orig, $photo); log::success("content", "Updated photo", "<a href=\"photos/$photo->id\">view</a>"); message::success(sprintf(_("Saved photo %s"), $photo->title)); |
