diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 11:59:19 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 11:59:19 -0400 |
commit | e52870068d67a2360769f76a13d35318a8ec14ef (patch) | |
tree | 2f7d8396234134377e3b85f598b05d23fad4d989 /pages | |
parent | ab58e6bc96758eda0c2b293b98240fba0f305ae1 (diff) | |
download | elgg-e52870068d67a2360769f76a13d35318a8ec14ef.tar.gz elgg-e52870068d67a2360769f76a13d35318a8ec14ef.tar.bz2 |
Fixes #18 adds forwarding when no access
Diffstat (limited to 'pages')
-rw-r--r-- | pages/photos/album/view.php | 5 | ||||
-rw-r--r-- | pages/photos/image/view.php | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/pages/photos/album/view.php b/pages/photos/album/view.php index cef3647ee..100cc44c6 100644 --- a/pages/photos/album/view.php +++ b/pages/photos/album/view.php @@ -12,8 +12,9 @@ group_gatekeeper(); $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()); diff --git a/pages/photos/image/view.php b/pages/photos/image/view.php index 6bd0257e0..1d359b6c7 100644 --- a/pages/photos/image/view.php +++ b/pages/photos/image/view.php @@ -12,7 +12,9 @@ group_gatekeeper(); $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(); |