aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/search/search_hooks.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/mod/search/search_hooks.php b/mod/search/search_hooks.php
index 371a47633..89d4f1dbd 100644
--- a/mod/search/search_hooks.php
+++ b/mod/search/search_hooks.php
@@ -187,9 +187,6 @@ function search_tags_hook($hook, $type, $value, $params) {
$tags = implode(', ', $entity->tags);
}
- $tags_str = search_get_highlighted_relevant_substrings($tags, $params['query']);
- $tags_str = '(' . elgg_echo('tags') . ": $tags_str)";
-
// Nick told me my idea was dirty, so I'm hard coding the numbers.
$title_tmp = $entity->title;
if (elgg_strlen($title_tmp) > 297) {
@@ -205,7 +202,9 @@ function search_tags_hook($hook, $type, $value, $params) {
$desc_str = $desc_tmp;
}
- $desc_str = search_get_highlighted_relevant_substrings($tags, $entity->description);
+ $tags_str = search_get_highlighted_relevant_substrings($tags, $params['query']);
+ $tags_str = '(' . elgg_echo('tags') . ": $tags_str)";
+
$entity->setVolatileData('search_matched_title', $title_str);
$entity->setVolatileData('search_matched_description', $desc_str);
$entity->setVolatileData('search_matched_extra', $tags_str);