diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/pages/pages/pages/view.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php index 81477a8d4..9bfd67a12 100644 --- a/mod/pages/pages/pages/view.php +++ b/mod/pages/pages/pages/view.php @@ -32,7 +32,8 @@ elgg_push_breadcrumb($title); $content = elgg_view_entity($page, array('full_view' => true)); $content .= elgg_view_comments($page); -if (elgg_is_admin_logged_in() || elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { +// can add subpage if can edit this page and write to container (such as a group) +if ($page->canEdit() && $container->canWriteToContainer(0, 'object', 'page')) { $url = "pages/add/$page->guid"; elgg_register_menu_item('title', array( 'name' => 'subpage', |