aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 7d7551a3d..40d709fe3 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1189,14 +1189,19 @@
if ($subtype!=="")
$where[] = "subtype=$subtype";
if ($owner_guid != "") {
- if (!is_array($owner_guid)) {
+ if (!is_array($owner_guid)) {
+ $owner_array = array($owner_guid);
$owner_guid = (int) $owner_guid;
$where[] = "owner_guid = '$owner_guid'";
- } else if (sizeof($owner_guid) > 0) {
+ } else if (sizeof($owner_guid) > 0) {
+ $owner_array = $owner_guid;
// Cast every element to the owner_guid array to int
$owner_guid = array_map("sanitise_int", $owner_guid);
$owner_guid = implode(",",$owner_guid);
$where[] = "owner_guid in ({$owner_guid})";
+ }
+ if (is_null($container_guid)) {
+ $container_guid = array_merge(0,$owner_guid);
}
}
if ($site_guid > 0)