* (bug 3562) for go search, try Caps-Variants-Broken-At-Non-Whitespace

This commit is contained in:
Brion Vibber 2005-11-10 07:46:56 +00:00
parent 43f3501f06
commit 12e8fede56
2 changed files with 13 additions and 0 deletions

View 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 ===

View 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