aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/delete.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
commit949a233076ec18f86e60f90a7a8837cb422664af (patch)
tree0286c9cb2c3301a164505e39dccf02a4e0a98497 /mod/groups/actions/delete.php
parentd4e4268d11612408e4989a5c57f69fcb2febe8aa (diff)
downloadelgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.gz
elgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.bz2
Refs #2428 almost done removing CONFIG access - mostly plugin start.php left
git-svn-id: http://code.elgg.org/elgg/trunk@7999 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/actions/delete.php')
-rw-r--r--mod/groups/actions/delete.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php
index 2983bc2ce..5672e8c47 100644
--- a/mod/groups/actions/delete.php
+++ b/mod/groups/actions/delete.php
@@ -1,19 +1,20 @@
<?php
- global $CONFIG;
+/**
+ * Delete a group
+ */
- $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'));
- }
+$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'));
-
- $url_name = get_loggedin_user()->username;
- forward(elgg_get_site_url()."pg/groups/member/{$url_name}");
-?> \ No newline at end of file
+}
+else
+ register_error(elgg_echo('group:notdeleted'));
+
+$url_name = get_loggedin_user()->username;
+forward(elgg_get_site_url() . "pg/groups/member/{$url_name}");