From 90baebb659b3e47dac24da969e232ff0cef94a1b Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 18 Nov 2011 17:50:36 -0500 Subject: Fixes #4118 returning bool from leave group functions --- engine/classes/ElggGroup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/classes/ElggGroup.php') diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php index 49ba27204..5c16e978f 100644 --- a/engine/classes/ElggGroup.php +++ b/engine/classes/ElggGroup.php @@ -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 -- cgit v1.2.3 From 1cfd760ee857011499b999ce282b5c1a98b94dca Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 18 Nov 2011 21:57:52 -0500 Subject: Fixes #4111 guid is now an int --- engine/classes/ElggEntity.php | 3 +++ engine/classes/ElggGroup.php | 3 +++ engine/classes/ElggObject.php | 5 ++++- engine/classes/ElggSite.php | 5 ++++- engine/classes/ElggUser.php | 5 ++++- 5 files changed, 18 insertions(+), 3 deletions(-) (limited to 'engine/classes/ElggGroup.php') diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index fdf2a80ea..df87082fe 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -1335,6 +1335,9 @@ abstract class ElggEntity extends ElggData implements $this->attributes['tables_loaded']++; } + // guid needs to be an int http://trac.elgg.org/ticket/4111 + $this->attributes['guid'] = (int)$this->attributes['guid']; + // Cache object handle if ($this->attributes['guid']) { cache_entity($this); diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php index 5c16e978f..0190e5eac 100644 --- a/engine/classes/ElggGroup.php +++ b/engine/classes/ElggGroup.php @@ -349,6 +349,9 @@ class ElggGroup extends ElggEntity $this->attributes[$key] = $value; } + // guid needs to be an int http://trac.elgg.org/ticket/4111 + $this->attributes['guid'] = (int)$this->attributes['guid']; + return true; } diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php index caccfb038..0b8340697 100644 --- a/engine/classes/ElggObject.php +++ b/engine/classes/ElggObject.php @@ -110,7 +110,7 @@ class ElggObject extends ElggEntity { $row = get_object_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 @@ -119,6 +119,9 @@ class ElggObject extends ElggEntity { $this->attributes[$key] = $value; } + // guid needs to be an int http://trac.elgg.org/ticket/4111 + $this->attributes['guid'] = (int)$this->attributes['guid']; + return true; } diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php index 16b80b9d3..5c44d4076 100644 --- a/engine/classes/ElggSite.php +++ b/engine/classes/ElggSite.php @@ -128,7 +128,7 @@ class ElggSite extends ElggEntity { $row = get_site_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 @@ -137,6 +137,9 @@ class ElggSite extends ElggEntity { $this->attributes[$key] = $value; } + // guid needs to be an int http://trac.elgg.org/ticket/4111 + $this->attributes['guid'] = (int)$this->attributes['guid']; + return true; } diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php index 75ac008f6..a1c7147a5 100644 --- a/engine/classes/ElggUser.php +++ b/engine/classes/ElggUser.php @@ -114,7 +114,7 @@ class ElggUser extends ElggEntity $row = get_user_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 @@ -123,6 +123,9 @@ class ElggUser extends ElggEntity $this->attributes[$key] = $value; } + // guid needs to be an int http://trac.elgg.org/ticket/4111 + $this->attributes['guid'] = (int)$this->attributes['guid']; + return true; } -- cgit v1.2.3