Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Fixes #18 adds forwarding when no access
Browse files Browse the repository at this point in the history
  • Loading branch information
cash committed Jul 14, 2012
1 parent ab58e6b commit e528700
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pages/photos/album/view.php
Expand Up @@ -12,8 +12,9 @@
$album_guid = (int) get_input('guid');
$album = get_entity($album_guid);
if (!$album) {
// @todo album deleted or don't have access
forward('photos/all');
register_error(elgg_echo('noaccess'));
$_SESSION['last_forward_from'] = current_page_url();
forward('');
}

elgg_set_page_owner_guid($album->getContainerGUID());
Expand Down
4 changes: 3 additions & 1 deletion pages/photos/image/view.php
Expand Up @@ -12,7 +12,9 @@
$photo_guid = (int) get_input('guid');
$photo = get_entity($photo_guid);
if (!$photo) {

register_error(elgg_echo('noaccess'));
$_SESSION['last_forward_from'] = current_page_url();
forward('');
}

$photo->addView();
Expand Down

0 comments on commit e528700

Please sign in to comment.