aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-13 22:52:54 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-13 22:52:54 +0000
commit49f59ef89ee36eda39b32247bd583c92475c0fc4 (patch)
treee4eed31dedaf7a301fba83993e41a139d2c25224 /views/default
parente0431dfd7d0043551db9696cf5cb5a01ff30214c (diff)
downloadelgg-49f59ef89ee36eda39b32247bd583c92475c0fc4.tar.gz
elgg-49f59ef89ee36eda39b32247bd583c92475c0fc4.tar.bz2
Cleaned up tag searching so you can search on a specific tag. Useful in search so a tag in "Things I like" won't match a tag in "Things I hate."
git-svn-id: http://code.elgg.org/elgg/trunk@3938 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/output/tags.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/views/default/output/tags.php b/views/default/output/tags.php
index 1afc89d88..b93536797 100644
--- a/views/default/output/tags.php
+++ b/views/default/output/tags.php
@@ -29,6 +29,17 @@ if (empty($vars['tags']) && !empty($vars['value'])) {
$vars['tags'] = $vars['value'];
}
+$tag_names_str = '';
+if (isset($vars['tag_names'])) {
+ if (is_array($vars['tag_names'])) {
+ foreach ($vars['tag_names'] as $tag_name) {
+ $tag_names_str .= "&tag_names[]=$tag_name";
+ }
+ } else {
+ $tag_names_str = "&tag_names={$vars['tag_names']}";
+ }
+}
+
if (!empty($vars['tags'])) {
$tagstr = "";
if (!is_array($vars['tags'])) {
@@ -45,7 +56,7 @@ if (!empty($vars['tags'])) {
$type = "";
}
if (is_string($tag)) {
- $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}{$tag_names_str}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
}
echo $tagstr;