aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/access.php9
-rw-r--r--engine/lib/annotations.php6
-rw-r--r--engine/lib/metadata.php12
3 files changed, 20 insertions, 7 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 39f7925c6..c7a87ced5 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -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;
}
}
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 7f5ab93f2..806e3699f 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -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) {
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 66fa78401..dd2e341d4 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -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) {