aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 17:02:39 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 17:02:39 +0000
commitd50afd6de5bfb5c794b99c100f3d311fc9f95d8b (patch)
tree882b5622e8075d74804f7ed05c7cfafdb8a03194 /engine/lib/metadata.php
parentbbff983c576762ff138f482cdabd73c184243184 (diff)
downloadelgg-d50afd6de5bfb5c794b99c100f3d311fc9f95d8b.tar.gz
elgg-d50afd6de5bfb5c794b99c100f3d311fc9f95d8b.tar.bz2
Improving the metadata search in cases where users have multiple tags with the same text
git-svn-id: https://code.elgg.org/elgg/trunk@508 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 5ed435a0c..aba7e782d 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -340,7 +340,7 @@
if ($meta_value!="")
$where[] = "m.value_id='$meta_v'";
- $query = "SELECT * from {$CONFIG->dbprefix}entities e JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid where";
+ $query = "SELECT distinct e.* from {$CONFIG->dbprefix}entities e JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid where";
foreach ($where as $w)
$query .= " $w and ";
$query .= " (e.access_id in {$access} or (e.access_id = 0 and e.owner_guid = {$_SESSION['id']}))"; // Add access controls