Skip to content

Commit

Permalink
Only call $theme->item() if we're in a non admin theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Sep 12, 2010
1 parent bfd92ac commit b4fb11f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/gallery/helpers/gallery_event.php
Expand Up @@ -209,10 +209,9 @@ static function user_menu($menu, $theme) {
->url(user_profile::url($user->id))
->label($user->display_name()));

$item = $theme->item();
if (Router::$controller == "admin") {
$continue_url = url::abs_site("");
} else if ($item) {
} else if ($item = $theme->item()) {
if (access::user_can(identity::guest(), "view", $theme->item)) {
$continue_url = $item->abs_url();
} else {
Expand Down

0 comments on commit b4fb11f

Please sign in to comment.