]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Merged [6875] from 1.7 branch into trunk
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 29 Aug 2010 13:09:12 +0000 (13:09 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 29 Aug 2010 13:09:12 +0000 (13:09 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6878 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/access.php
engine/lib/annotations.php
engine/lib/metadata.php

index 39f7925c6a73d099b35cb6fb0dbdd5a7e35d763f..c7a87ced574569c04e9475d50d995f009f2950cd 100644 (file)
@@ -712,10 +712,11 @@ function get_entities_from_access_id($collection_id, $entity_type = "", $entity_
                $options['order_by'] = sanitise_string("e.time_created, $order_by");
        }
 
-       if ((is_array($owner_guid) && (count($owner_guid)))) {
-               $options['owner_guids'] = array();
-               foreach($owner_guid as $guid) {
-                       $options['owner_guids'][] = $guid;
+       if ($owner_guid) {
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
                }
        }
 
index 7f5ab93f2cf5ceb9ddb1b1cf403bd096774736a0..806e3699fb09f814bc96af45542f42eaf0eac053 100644 (file)
@@ -526,7 +526,11 @@ $timelower = 0, $timeupper = 0) {
        }
 
        if ($owner_guid) {
-               $options['annotation_owner_guid'] = $owner_guid;
+               if (is_array($owner_guid)) {
+                       $options['annotation_owner_guids'] = $owner_guid;
+               } else {
+                       $options['annotation_owner_guid'] = $owner_guid;
+               }
        }
 
        if ($group_guid) {
index 66fa784015223140eda1ba84e596ed483edbee5d..dd2e341d482f8513b9f76fb21662df40aca8e187 100644 (file)
@@ -945,7 +945,11 @@ $count = FALSE, $case_sensitive = TRUE) {
        }
 
        if ($owner_guid) {
-               $options['owner_guid'] = $owner_guid;
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
        }
 
        if ($limit) {
@@ -1076,7 +1080,11 @@ $count = false, $meta_array_operator = 'and') {
        }
 
        if ($owner_guid) {
-               $options['owner_guid'] = $owner_guid;
+               if (is_array($owner_guid)) {
+                       $options['owner_guids'] = $owner_guid;
+               } else {
+                       $options['owner_guid'] = $owner_guid;
+               }
        }
 
        if ($limit) {