aboutsummaryrefslogtreecommitdiff
path: root/mod/guidtool/actions
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-09 15:13:03 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-09 15:13:03 +0000
commitd1f12039e6ddd29dd18bb9132673e6ff6668e5f0 (patch)
treea7bb5f81b96cc14cff709645af5860881d55fea5 /mod/guidtool/actions
parente71557a73340f21fc43f5a80f7baabecca43289a (diff)
downloadelgg-d1f12039e6ddd29dd18bb9132673e6ff6668e5f0.tar.gz
elgg-d1f12039e6ddd29dd18bb9132673e6ff6668e5f0.tar.bz2
Refs #492: Export and delete links next to entity
git-svn-id: https://code.elgg.org/elgg/trunk@2688 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/guidtool/actions')
-rw-r--r--mod/guidtool/actions/delete.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/guidtool/actions/delete.php b/mod/guidtool/actions/delete.php
new file mode 100644
index 000000000..36126ee10
--- /dev/null
+++ b/mod/guidtool/actions/delete.php
@@ -0,0 +1,21 @@
+<?php
+ global $CONFIG;
+
+ admin_gatekeeper();
+ action_gatekeeper();
+
+ $guid = (int)get_input('guid');
+ $entity = get_entity($guid);
+
+ if ($entity)
+ {
+ if ($entity->delete())
+ system_message(sprintf(elgg_echo('guidtool:deleted'), $guid));
+ else
+ register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid));
+ }
+ else
+ register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid));
+
+ forward($_SERVER['HTTP_REFERER']);
+?> \ No newline at end of file