diff options
author | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 |
commit | 9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch) | |
tree | 87377f7b889efc639935508556beb9baf010e821 /mod/search/start.php | |
parent | 24690ed95198c093e6fbb91a94b5d0544c740f89 (diff) | |
download | elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2 |
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'mod/search/start.php')
-rw-r--r-- | mod/search/start.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/search/start.php b/mod/search/start.php index bb8531e9c..d2d7ed3c2 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -83,15 +83,18 @@ function search_page_handler($page) { * @param string $query * @param int $min_match_context = 30 * @param int $max_length = 300 + * @param bool $tag_match Search is for tags. Don't ignore words. * @return string */ -function search_get_highlighted_relevant_substrings($haystack, $query, $min_match_context = 30, $max_length = 300) { +function search_get_highlighted_relevant_substrings($haystack, $query, $min_match_context = 30, $max_length = 300, $tag_match = false) { $haystack = strip_tags($haystack); $haystack_length = elgg_strlen($haystack); $haystack_lc = elgg_strtolower($haystack); - $words = search_remove_ignored_words($query, 'array'); + if (!$tag_match) { + $words = search_remove_ignored_words($query, 'array'); + } // if haystack < $max_length return the entire haystack w/formatting immediately if ($haystack_length <= $max_length) { |