From 85dd010eb40fd46b52f2e265fe7e5bdc39aa7d7b Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 17 Dec 2009 12:44:19 +0000 Subject: when asking for a count of entities, we now return an integer rather than a string git-svn-id: http://code.elgg.org/elgg/trunk@3764 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index f86299c6e..358a45c3c 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -549,7 +549,7 @@ abstract class ElggEntity implements } /** - * Returns whether the given user (or current user) has the ability to write to this group. + * Returns whether the given user (or current user) has the ability to write to this container. * * @param int $user_guid The user. * @return bool @@ -1640,7 +1640,8 @@ function get_entity($guid) { * * joins => array() Additional joins * - * @return array + * @return if count, int + * if not count, array or false if no entities */ function elgg_get_entities(array $options = array()) { global $CONFIG; @@ -1773,7 +1774,7 @@ function elgg_get_entities(array $options = array()) { return $dt; } else { $total = get_data_row($query); - return $total->total; + return (int)$total->total; } } -- cgit v1.2.3