r26269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26268‎ | r26269 | r26270 >
Date:13:05, 1 October 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 278) Search results no longer highlight incorrect partial word matches
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SearchMySQL4.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SearchMySQL4.php
@@ -54,7 +54,7 @@
5555 // Match the quoted term in result highlighting...
5656 $regexp = preg_quote( str_replace( '"', '', $terms[2] ), '/' );
5757 }
58 - $this->searchTerms[] = $regexp;
 58+ $this->searchTerms[] = "\b$regexp\b";
5959 }
6060 wfDebug( "Would search with '$searchon'\n" );
6161 wfDebug( 'Match with /\b' . implode( '\b|\b', $this->searchTerms ) . "\b/\n" );
Index: trunk/phase3/RELEASE-NOTES
@@ -79,7 +79,9 @@
8080 * (bug 11462) Fix typo in LanguageGetSpecialPageAliases hook name
8181 * (bug 11474) Fix unintentional fall-through in math error handling
8282 * (bug 11478) Fix undefined method call in file deletion interface
 83+* (bug 278) Search results no longer highlight incorrect partial word matches
8384
 85+
8486 === API changes in 1.12 ===
8587
8688 Full API documentation is available at http://www.mediawiki.org/wiki/API

Follow-up revisions

RevisionCommit summaryAuthorDate
r26271* (bug 278) Search results no longer highlight incorrect partial word matches...brion13:10, 1 October 2007
r26280Merged revisions 26248-26279 via svnmerge from...david19:12, 1 October 2007
r34210Re-commit r34072 with some modifications:...rainman15:31, 4 May 2008

Status & tagging log