aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/metadata.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 35ea073f0..3decc1461 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -633,7 +633,13 @@
$offset = (int)$offset;
if ($order_by == "") $order_by = "e.time_created desc";
$order_by = sanitise_string($order_by);
- $owner_guid = (int) $owner_guid;
+ if ((is_array($owner_guid) && (count($owner_guid)))) {
+ foreach($owner_guid as $key => $guid) {
+ $owner_guid[$key] = (int) $guid;
+ }
+ } else {
+ $owner_guid = (int) $owner_guid;
+ }
$site_guid = (int) $site_guid;
if ($site_guid == 0)
@@ -646,9 +652,13 @@
if ($entity_subtype)
$where[] = "e.subtype = {$entity_subtype}";
if ($site_guid > 0)
- $where[] = "e.site_guid = {$site_guid}";
- if ($owner_guid > 0)
+ $where[] = "e.site_guid = {$site_guid}";
+ if (is_array($owner_guid)) {
+ $where[] = "e.container_guid in (".implode(",",$owner_guid).")";
+ } else if ($owner_guid > 0)
$where[] = "e.container_guid = {$owner_guid}";
+ //if ($owner_guid > 0)
+ // $where[] = "e.container_guid = {$owner_guid}";
if ($count) {
$query = "SELECT count(distinct e.guid) as total ";