aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-09 16:55:54 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-09 16:55:54 +0000
commitfbd79f863a8cad8ba17c80be011ecfda914d37c5 (patch)
tree6649fbe9323a60a45993bc3fe7eb63e7618bbf3a /mod/groups/actions
parent2330e92ff935a9fb14147d37ce227c40e3d7c257 (diff)
downloadelgg-fbd79f863a8cad8ba17c80be011ecfda914d37c5.tar.gz
elgg-fbd79f863a8cad8ba17c80be011ecfda914d37c5.tar.bz2
Closes #282, Refs #640: Group deletion enabled. TODO: Suggested enhancement #752
git-svn-id: https://code.elgg.org/elgg/trunk@2695 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/actions')
-rw-r--r--mod/groups/actions/delete.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php
new file mode 100644
index 000000000..f75faee76
--- /dev/null
+++ b/mod/groups/actions/delete.php
@@ -0,0 +1,18 @@
+<?php
+ global $CONFIG;
+
+ $guid = (int)get_input('group_guid');
+ $entity = get_entity($guid);
+
+ if (($entity) && ($entity instanceof ElggGroup))
+ {
+ if ($entity->delete())
+ system_message(elgg_echo('group:deleted'));
+ else
+ register_error(elgg_echo('group:notdeleted'));
+ }
+ else
+ register_error(elgg_echo('group:notdeleted'));
+
+ forward($_SERVER['HTTP_REFERER']);
+?> \ No newline at end of file