aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-04-20 15:31:51 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-04-20 15:31:51 -0400
commit0dced8d5b853c2ba853b8507f8d2142a09784d52 (patch)
treec0ca203a937dbdce21f4de5eae978b2c8214a315 /mod/groups/actions
parent0d9c5c1ccd66018a819b4ca327ab203f473e35dc (diff)
parent34625fc95c5e2250ed68abd94c28dccd16438759 (diff)
downloadelgg-0dced8d5b853c2ba853b8507f8d2142a09784d52.tar.gz
elgg-0dced8d5b853c2ba853b8507f8d2142a09784d52.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'mod/groups/actions')
-rw-r--r--mod/groups/actions/groups/featured.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/mod/groups/actions/groups/featured.php b/mod/groups/actions/groups/featured.php
index 2d623b1e4..4cb9f8122 100644
--- a/mod/groups/actions/groups/featured.php
+++ b/mod/groups/actions/groups/featured.php
@@ -10,17 +10,18 @@ $action = get_input('action_type');
$group = get_entity($group_guid);
-if ($group) {
- //get the action, is it to feature or unfeature
- if ($action == "feature") {
- $group->featured_group = "yes";
- system_message(elgg_echo('groups:featuredon'));
- }
+if (!elgg_instanceof($group, 'group')) {
+ register_error(elgg_echo('groups:featured_error'));
+ forward(REFERER);
+}
- if ($action == "unfeature") {
- $group->featured_group = "no";
- system_message(elgg_echo('groups:unfeatured'));
- }
+//get the action, is it to feature or unfeature
+if ($action == "feature") {
+ $group->featured_group = "yes";
+ system_message(elgg_echo('groups:featuredon', array($group->name)));
+} else {
+ $group->featured_group = "no";
+ system_message(elgg_echo('groups:unfeatured', array($group->name)));
}
forward(REFERER);