* @static
* @param string $term
* @return Title
- * @access private
+ * @private
*/
function getNearMatch( $term ) {
# Exact match? No need to look further.
if ( $title->exists() ) {
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/',
if ( $title->exists() ) {
return $title;
}
-
+
global $wgCapitalLinks, $wgContLang;
if( !$wgCapitalLinks ) {
// Catch differs-by-first-letter-case-only
* active database backend, and return a configured instance.
*
* @return SearchEngine
- * @access private
+ * @private
*/
function create() {
global $wgDBtype, $wgSearchType;
$class = $wgSearchType;
} elseif( $wgDBtype == 'mysql' ) {
$class = 'SearchMySQL4';
- require_once( 'SearchMySQL4.php' );
- } else if ( $wgDBtype == 'PostgreSQL' ) {
- $class = 'SearchTsearch2';
- require_once( 'SearchTsearch2.php' );
+ } else if ( $wgDBtype == 'postgres' ) {
+ $class = 'SearchPostgres';
} else {
$class = 'SearchEngineDummy';
}
function searchtitle() {}
function searchtext() {}
}
-
+?>