]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
when asking for a count of entities, we now return an integer rather than a string
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 17 Dec 2009 12:44:19 +0000 (12:44 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 17 Dec 2009 12:44:19 +0000 (12:44 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3764 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/entities.php

index f86299c6edc249213e39ca20962072e6b6e29bbb..358a45c3c58a430bba9958f55e9f348dc20275ae 100644 (file)
@@ -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;
        }
 }