diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 15:13:03 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 15:13:03 +0000 |
commit | d1f12039e6ddd29dd18bb9132673e6ff6668e5f0 (patch) | |
tree | a7bb5f81b96cc14cff709645af5860881d55fea5 /mod/guidtool/actions/delete.php | |
parent | e71557a73340f21fc43f5a80f7baabecca43289a (diff) | |
download | elgg-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/delete.php')
-rw-r--r-- | mod/guidtool/actions/delete.php | 21 |
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 |