diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-09-11 21:38:38 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-09-11 21:38:46 -0700 |
commit | bfd92ac6f2d563106bc5906cc9fddb35bca44b58 (patch) | |
tree | e03e9cacb2abfe17839407af64132a934bbfce6f /modules/gallery | |
parent | c9c4f96100c5c8304f337f720da2e96b0a4d524a (diff) |
Use $theme->item() instead of $theme->item, otherwise
isset($theme->item) may return true even when we don't have an actual
Item_Model in there.
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 0ba98025..81659b38 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -209,11 +209,12 @@ class gallery_event_Core { ->url(user_profile::url($user->id)) ->label($user->display_name())); + $item = $theme->item(); if (Router::$controller == "admin") { $continue_url = url::abs_site(""); - } else if (isset($theme->item)) { + } else if ($item) { if (access::user_can(identity::guest(), "view", $theme->item)) { - $continue_url = $theme->item->abs_url(); + $continue_url = $item->abs_url(); } else { $continue_url = item::root()->abs_url(); } |