]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3958 added special catch for liking groups
authorCash Costello <cash.costello@gmail.com>
Wed, 26 Oct 2011 11:30:58 +0000 (07:30 -0400)
committerCash Costello <cash.costello@gmail.com>
Wed, 26 Oct 2011 11:30:58 +0000 (07:30 -0400)
mod/likes/start.php

index 76b48a369add311cd01a38fb19680af95c1613ea..690d7c05239d6a3dbf3f637928742fcce0627f8f 100644 (file)
@@ -60,6 +60,12 @@ function likes_entity_menu_setup($hook, $type, $return, $params) {
 function likes_river_menu_setup($hook, $type, $return, $params) {
        if (elgg_is_logged_in()) {
                $item = $params['item'];
+
+               // only like group creation #3958
+               if ($item->type == "group" && $item->view != "river/group/create") {
+                       return $return;
+               }
+               
                $object = $item->getObjectEntity();
                if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
                        if ($object->canAnnotate(0, 'likes')) {