diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-12-25 23:43:44 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-25 23:43:44 +0000 |
| commit | 2c91a7e9ced0d2134682450dc1713b8e1b239dae (patch) | |
| tree | 25b7bd2cb67fba30e091ff8e250714250ae7ad4f /core/controllers/albums.php | |
| parent | 847d42682d02f2bd86ff0e5a247c38e1f55d86b9 (diff) | |
Rework log and message helpers to be parallel, but separate.
1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
Diffstat (limited to 'core/controllers/albums.php')
| -rw-r--r-- | core/controllers/albums.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/controllers/albums.php b/core/controllers/albums.php index 47412dfc..61d6ad22 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -79,9 +79,9 @@ class Albums_Controller extends Items_Controller { $this->input->post("description"), user::active()->id); - log::add("content", "Created an album", log::INFO, + log::success("content", "Created an album", html::anchor("albums/$new_album->id", "view album")); - message::add(_("Successfully created album")); + message::success(sprintf(_("Created album %s"), $new_album->title)); print json_encode( array("result" => "success", @@ -107,9 +107,9 @@ class Albums_Controller extends Items_Controller { $this->input->post("description"), user::active()->id); - log::add("content", "Added a photo", log::INFO, + log::success("content", "Added a photo", html::anchor("photos/$photo->id", "view photo")); - message::add(_("Successfully added photo")); + message::add(sprintf(_("Added photo %s"), $photo->title)); print json_encode( array("result" => "success", @@ -139,8 +139,8 @@ class Albums_Controller extends Items_Controller { module::event("album_changed", $album); - log::add("content", "Updated album", log::INFO, "<a href=\"albums/$album->id\">view</a>"); - message::add(_("Successfully saved album")); + log::success("content", "Updated album", "<a href=\"albums/$album->id\">view</a>"); + message::success(sprintf(_("Saved album %s"), $album->title)); print json_encode( array("result" => "success", |
