]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4118 returning bool from leave group functions
authorcash <cash.costello@gmail.com>
Fri, 18 Nov 2011 22:50:36 +0000 (17:50 -0500)
committercash <cash.costello@gmail.com>
Tue, 29 Nov 2011 02:43:59 +0000 (21:43 -0500)
engine/classes/ElggGroup.php
engine/lib/relationships.php

index 49ba272045d63eb51e47e99428e6cd54939d8a4b..5c16e978f78ad3f6a5535d751759a016790528b7 100644 (file)
@@ -309,7 +309,7 @@ class ElggGroup extends ElggEntity
         *
         * @param ElggUser $user User
         *
-        * @return void
+        * @return bool
         */
        public function leave(ElggUser $user) {
                return leave_group($this->getGUID(), $user->getGUID());
@@ -322,7 +322,7 @@ class ElggGroup extends ElggEntity
         *
         * @param int $guid GUID of an ElggGroup entity
         *
-        * @return true
+        * @return bool
         */
        protected function load($guid) {
                // Test to see if we have the generic stuff
@@ -340,7 +340,7 @@ class ElggGroup extends ElggEntity
                $row = get_group_entity_as_row($guid);
                if (($row) && (!$this->isFullyLoaded())) {
                        // If $row isn't a cached copy then increment the counter
-                       $this->attributes['tables_loaded'] ++;
+                       $this->attributes['tables_loaded']++;
                }
 
                // Now put these into the attributes array as core values
index 3578f0cb8db3cdd48273a49914c939bc793a8498..5b7080b563ce97a1a8d1dc524b5b9a1270c19c32 100644 (file)
@@ -158,7 +158,7 @@ function remove_entity_relationship($guid_one, $relationship, $guid_two) {
                        and relationship='$relationship'
                        and guid_two=$guid_two";
 
-               return delete_data($query);
+               return (bool)delete_data($query);
        } else {
                return false;
        }