From 8620c3fa01cb37506976a944f151d3058b587062 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 8 Jan 2009 02:39:21 +0000 Subject: Update event calls to take the orig and new models so that event listeners can do comparisons --- core/controllers/albums.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/controllers/albums.php') diff --git a/core/controllers/albums.php b/core/controllers/albums.php index 486d57af..20291315 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -147,11 +147,12 @@ class Albums_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 $album; $album->title = $form->edit_album->title->value; $album->description = $form->edit_album->description->value; $album->save(); - module::event("album_changed", $album); + module::event("album_changed", $orig, $album); log::success("content", "Updated album", "id\">view"); message::success(sprintf(_("Saved album %s"), $album->title)); -- cgit v1.2.3