diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 21:01:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 21:01:42 -0300 |
commit | 815bb3bf5a5e8da9a7962a4a532c3129f09d5735 (patch) | |
tree | 41bec5b730cc3dca936438f9e97810e7ab3ede0a /mod/subgroups/actions/subgroups/remove.php | |
parent | c102a5c9f4e9e2f78260019ccab6098435b1df19 (diff) | |
parent | 5f6dc365a8445a48156b45912827eac39fd64fc5 (diff) | |
download | elgg-815bb3bf5a5e8da9a7962a4a532c3129f09d5735.tar.gz elgg-815bb3bf5a5e8da9a7962a4a532c3129f09d5735.tar.bz2 |
Merge commit '5f6dc365a8445a48156b45912827eac39fd64fc5' as 'mod/subgroups'
Diffstat (limited to 'mod/subgroups/actions/subgroups/remove.php')
-rw-r--r-- | mod/subgroups/actions/subgroups/remove.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/subgroups/actions/subgroups/remove.php b/mod/subgroups/actions/subgroups/remove.php new file mode 100644 index 000000000..206673de3 --- /dev/null +++ b/mod/subgroups/actions/subgroups/remove.php @@ -0,0 +1,13 @@ +<?php + +$group_guid = get_input('group'); +$othergroup_guid = get_input('othergroup'); +$group = get_entity($group_guid); +$othergroup = get_entity($othergroup_guid); +if ($group instanceof ElggGroup && $group->canEdit()) { + if ($othergroup instanceof ElggGroup && $othergroup->canEdit() && $othergroup->container_guid == $group_guid) { + $othergroup->container_guid = $other_group->owner_guid; + $othergroup->save(); + } +} +forward(REFERER); |