aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 18:07:16 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 18:07:16 +0000
commit2d0ceebc979903474e445b04cd2dbe406a8b1f3f (patch)
treefabc2bdb80c3e498b51cab9d84dcc5ee90ac70ae /engine/lib/metadata.php
parent9cdb242250336005002e7cc7ffa4d8c3316db30b (diff)
downloadelgg-2d0ceebc979903474e445b04cd2dbe406a8b1f3f.tar.gz
elgg-2d0ceebc979903474e445b04cd2dbe406a8b1f3f.tar.bz2
Search and metadata functions now support multiple user GUIDs
git-svn-id: https://code.elgg.org/elgg/trunk@1134 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 11f40e51d..51d932c1a 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -459,7 +459,13 @@
if ($order_by == "") $order_by = "e.time_created desc";
$order_by = sanitise_string($order_by);
$site_guid = (int) $site_guid;
- $owner_guid = (int) $owner_guid;
+ if (is_array($owner_guid)) {
+ foreach($owner_guid as $key => $guid) {
+ $owner_guid[$key] = (int) $guid;
+ }
+ } else {
+ $owner_guid = (int) $owner_guid;
+ }
if ($site_guid == 0)
$site_guid = $CONFIG->site_guid;
@@ -477,7 +483,9 @@
$where[] = "m.value_id='$meta_v'";
if ($site_guid > 0)
$where[] = "e.site_guid = {$site_guid}";
- if ($owner_guid > 0)
+ if (is_array($owner_guid)) {
+ $where[] = "e.owner_guid in (".implode(",",$owner_guid).")";
+ } else if ($owner_guid > 0)
$where[] = "e.owner_guid = {$owner_guid}";
if (!$count) {