]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Ignoring empty owner_guids in elgg_get_entities.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 9 Nov 2009 20:43:05 +0000 (20:43 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 9 Nov 2009 20:43:05 +0000 (20:43 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3644 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/entities.php

index 0afe30a6ef845e4e250ff3aab6d1de86d6720c97..0fa08de587abb5f374a8c82979c9b48c5bbe1c04 100644 (file)
@@ -1769,6 +1769,7 @@ function elgg_get_entities(array $options = array()) {
                        $offset = sanitise_int($options['offset']);
                        $query .= " LIMIT $offset, $limit";
                }
+
                $dt = get_data($query, "entity_row_to_elggstar");
 
                //@todo normalize this to array()
@@ -2009,7 +2010,7 @@ function elgg_get_entity_owner_where_sql($table, $owner_guids) {
        $where = '';
 
        // implode(',', 0) returns 0.
-       if (FALSE !== $owner_str = implode(',', $owner_guids_sanitised)) {
+       if (($owner_str = implode(',', $owner_guids_sanitised)) && ($owner_str !== FALSE) && ($owner_str !== '')) {
                $where = "({$table}.owner_guid IN ($owner_str))";
        }