* (bug 3562) for go search, try Caps-Variants-Broken-At-Non-Whitespace
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 10 Nov 2005 07:46:56 +0000 (07:46 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 10 Nov 2005 07:46:56 +0000 (07:46 +0000)
RELEASE-NOTES
includes/SearchEngine.php

index 8961b7c..c98d882 100644 (file)
@@ -218,6 +218,7 @@ fully support the editing toolbar, but was found to be too confusing.
   leads to hard-to-manage names.
 * (bug 2721) Regression: Use European number separators for vi: wikis
 * Allow parser cache on redirect targets
+* (bug 3562) for go search, try Caps-Variants-Broken-At-Non-Whitespace
 
 
 === Caveats ===
index 021b2a4..5423b47 100644 (file)
@@ -81,6 +81,18 @@ class SearchEngine {
                        return $title;
                }
                
+               # Now try Word-Caps-Breaking-At-Word-Breaks, for hyphenated names etc
+               $title = Title::newFromText( preg_replace_callback(
+                       '/\b([\w\x80-\xff]+)\b/',
+                       create_function( '$matches', '
+                               global $wgContLang;
+                               return $wgContLang->ucfirst($matches[1]);
+                               ' ),
+                       $term ) );
+               if ( $title->exists() ) {
+                       return $title;
+               }
+               
                global $wgCapitalLinks, $wgContLang;
                if( !$wgCapitalLinks ) {
                        // Catch differs-by-first-letter-case-only