Fixed insane selectField() usage from r58322
authorMax Semenik <maxsem@users.mediawiki.org>
Wed, 6 Jan 2010 18:52:19 +0000 (18:52 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Wed, 6 Jan 2010 18:52:19 +0000 (18:52 +0000)
includes/search/SearchSqlite.php

index b1cf6a6..96580ca 100644 (file)
@@ -45,8 +45,11 @@ class SearchSqlite extends SearchEngine {
         */
        function fulltextSearchSupported() {
                if ( self::$fulltextSupported === null ) {
-                       $res = $this->db->selectField( 'updatelog', 'ul_key', array( 'ul_key' => 'fts3' ), __METHOD__ );
-                       self::$fulltextSupported = $res && $this->db->numRows( $res ) > 0;
+                       self::$fulltextSupported = $this->db->selectField( 
+                               'updatelog', 
+                               'ul_key', 
+                               array( 'ul_key' => 'fts3' ), 
+                               __METHOD__ ) !== FALSE;
                }
                return self::$fulltextSupported;
        }