diff options
Diffstat (limited to 'mod/pages/actions/pages/delete.php')
-rw-r--r-- | mod/pages/actions/pages/delete.php | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php deleted file mode 100644 index 6533ed520..000000000 --- a/mod/pages/actions/pages/delete.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php
-
- $page = get_input('page');
-
- if ($page = get_entity($page)) {
-
- if ($page->canEdit()) {
-
- // Bring all child elements forward
- $parent = $page->parent_guid;
- if ($children = get_entities_from_metadata('parent_guid',$page->getGUID())) {
- foreach($children as $child) {
- $child->parent_guid = $parent;
- }
- }
- if ($page->delete()) {
- system_message(elgg_echo('pages:delete:success'));
- if ($parent) {
- if ($parent = get_entity($parent)) {
- forward($parent->getURL());
- exit;
- }
- }
- forward('pg/pages/owned/' . $_SESSION['user']->username);
- exit;
- }
-
- }
-
- }
-
- register_error(elgg_echo('pages:delete:failure'));
- forward($_SERVER['HTTP_REFERER']);
-
-?>
\ No newline at end of file |