Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexi...
[lhc/web/wiklou.git] / includes / SearchEngine.php
index 5423b47..c3b3851 100644 (file)
@@ -48,7 +48,7 @@ class SearchEngine {
         * @static
         * @param string $term
         * @return Title
-        * @access private
+        * @private
         */
        function getNearMatch( $term ) {
                # Exact match? No need to look further.
@@ -80,7 +80,7 @@ class SearchEngine {
                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/',
@@ -92,7 +92,7 @@ class SearchEngine {
                if ( $title->exists() ) {
                        return $title;
                }
-               
+
                global $wgCapitalLinks, $wgContLang;
                if( !$wgCapitalLinks ) {
                        // Catch differs-by-first-letter-case-only
@@ -187,7 +187,7 @@ class SearchEngine {
         * active database backend, and return a configured instance.
         *
         * @return SearchEngine
-        * @access private
+        * @private
         */
        function create() {
                global $wgDBtype, $wgSearchType;
@@ -195,10 +195,8 @@ class SearchEngine {
                        $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';
                }
@@ -344,4 +342,4 @@ class SearchEngineDummy {
        function searchtitle() {}
        function searchtext() {}
 }
-
+?>