aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-10 21:45:55 -0500
committercash <cash.costello@gmail.com>2011-11-16 19:53:03 -0500
commit8fb06897d3c1f6655e98dcf68eac02dcd7e26040 (patch)
treec1cba1da233b93eee918fbe3a7b1bdaaef0cf7ff
parentdcebe191152195ca56bcbff28e8062a7e62536f6 (diff)
downloadelgg-8fb06897d3c1f6655e98dcf68eac02dcd7e26040.tar.gz
elgg-8fb06897d3c1f6655e98dcf68eac02dcd7e26040.tar.bz2
fixed WSOD when trying to edit a private page
-rw-r--r--languages/en.php2
-rw-r--r--mod/pages/pages/pages/edit.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/languages/en.php b/languages/en.php
index 6aa292e5a..62effb334 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -237,6 +237,8 @@ $english = array(
'pageownerunavailable' => 'Warning: The page owner %d is not accessible!',
'viewfailure' => 'There was an internal failure in the view %s',
'changebookmark' => 'Please change your bookmark for this page',
+ 'noaccess' => 'This content has been removed, is invalid, or you do not have permission to view it.',
+
/**
* API
*/
diff --git a/mod/pages/pages/pages/edit.php b/mod/pages/pages/pages/edit.php
index 6f54d72bf..1f411b94d 100644
--- a/mod/pages/pages/pages/edit.php
+++ b/mod/pages/pages/pages/edit.php
@@ -10,12 +10,14 @@ gatekeeper();
$page_guid = (int)get_input('guid');
$page = get_entity($page_guid);
if (!$page) {
-
+ register_error(elgg_echo('noaccess'));
+ forward('');
}
$container = $page->getContainerEntity();
if (!$container) {
-
+ register_error(elgg_echo('noaccess'));
+ forward('');
}
elgg_set_page_owner_guid($container->getGUID());