]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Removed a line breaking description for comments in search.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 16:54:57 +0000 (16:54 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Dec 2009 16:54:57 +0000 (16:54 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3721 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/search/search_hooks.php

index 371a476338bda112501a644eee808c1a4242aa0d..89d4f1dbd2d5e93259563ac8840880b90c37bd45 100644 (file)
@@ -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);