]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed WSOD when trying to edit a private page
authorcash <cash.costello@gmail.com>
Fri, 11 Nov 2011 02:45:55 +0000 (21:45 -0500)
committercash <cash.costello@gmail.com>
Thu, 17 Nov 2011 00:53:03 +0000 (19:53 -0500)
languages/en.php
mod/pages/pages/pages/edit.php

index 6aa292e5a4a09960edd4b66d360b45b358f5dd56..62effb334f50adb45d3aacfa21b9a60015035da6 100644 (file)
@@ -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
  */
index 6f54d72bfe4b20e4c9cd03b460a60dee91834342..1f411b94d7189aa2e2c447d651b354f6f6c9b199 100644 (file)
@@ -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());