From: brettp Date: Thu, 3 Dec 2009 16:54:57 +0000 (+0000) Subject: Removed a line breaking description for comments in search. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8f277db1ef5dc21f831c7e05efc4a25c447c1fd8;p=lorea%2Felgg.git Removed a line breaking description for comments in search. git-svn-id: http://code.elgg.org/elgg/trunk@3721 36083f99-b078-4883-b0ff-0f9b5a30f544 --- 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);