diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-05-01 18:35:40 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-05-01 18:37:16 -0700 |
commit | a198fe67109af23a398f8a152d693074dc041396 (patch) | |
tree | 8e64b2724a69a8451dfce6010ea444cadf7d5870 | |
parent | b95ed85ddb4a07014f989c13375e0a9e54fa9826 (diff) | |
download | elgg-a198fe67109af23a398f8a152d693074dc041396.tar.gz elgg-a198fe67109af23a398f8a152d693074dc041396.tar.bz2 |
Refs #2139. Checking in pages delete action for owner / admin
-rw-r--r-- | mod/pages/actions/pages/delete.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php index dfa0de98d..7a314a280 100644 --- a/mod/pages/actions/pages/delete.php +++ b/mod/pages/actions/pages/delete.php @@ -9,8 +9,9 @@ $guid = get_input('guid'); $page = get_entity($guid); -if ($page) { - if ($page->canEdit()) { +if (elgg_instanceof($page, 'object', 'page') || elgg_instanceof($page, 'object', 'page_top')) { + // only allow owners and admin to delete + if (elgg_is_admin_logged_in() || elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) { $container = get_entity($page->container_guid); // Bring all child elements forward |