This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via c716bc73b663dbbd43246409f9fde50b6a640e27 (commit)
from 6c3bf77298b1f5f5b8b0b1da69c7908191dd385b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=c716bc73b663dbbd43246409f9fde50b6a640e27
commit c716bc73b663dbbd43246409f9fde50b6a640e27
Author: Roland Mas <[email protected]>
Date: Wed May 4 15:42:19 2016 +0200
Use PostgreSQL's highlighter for search results
diff --git a/src/www/search/include/renderers/HtmlSearchRenderer.class.php
b/src/www/search/include/renderers/HtmlSearchRenderer.class.php
index 3bcc566..bc0ecb6 100644
--- a/src/www/search/include/renderers/HtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/HtmlSearchRenderer.class.php
@@ -181,17 +181,7 @@ class HtmlSearchRenderer extends SearchRenderer {
* @return string text with keywords highlighted
*/
function highlightTargetWords($text) {
- if (empty($text)) {
- return ' ';
- }
- $words = $this->searchQuery->getWords();
- foreach ($this->searchQuery->getPhrases() as $p) {
- foreach (explode(' ',$p) as $w) {
- $words[] = $w;
- }
- }
- $regexp = implode('|',$words);
- return preg_replace('/('.str_replace('/', '\/',
$regexp).')/i','<span class="selected">\1</span>', $text);
+ return preg_replace('/<b>/','<b class="selected">', $text);
}
/**
-----------------------------------------------------------------------
Summary of changes:
.../search/include/renderers/HtmlSearchRenderer.class.php | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits