Merge "Limit bad transactions warnings to those involving possible writes."
[lhc/web/wiklou.git] / includes / db / DatabaseSqlite.php
index 15d1ad0..f1e553d 100644 (file)
@@ -176,7 +176,7 @@ class DatabaseSqlite extends DatabaseBase {
                }
                $cachedResult = false;
                $table = 'dummy_search_test';
-               
+
                $db = new DatabaseSqliteStandalone( ':memory:' );
 
                if ( $db->query( "CREATE VIRTUAL TABLE $table USING FTS3(dummy_field)", __METHOD__, true ) ) {
@@ -313,7 +313,7 @@ class DatabaseSqlite extends DatabaseBase {
 
        /**
         * @param $res ResultWrapper
-        * @param $n 
+        * @param $n
         * @return bool
         */
        function fieldName( $res, $n ) {
@@ -622,7 +622,7 @@ class DatabaseSqlite extends DatabaseBase {
         * @return string User-friendly database information
         */
        public function getServerInfo() {
-               return wfMsg( self::getFulltextSearchModule() ? 'sqlite-has-fts' : 'sqlite-no-fts', $this->getServerVersion() );
+               return wfMessage( self::getFulltextSearchModule() ? 'sqlite-has-fts' : 'sqlite-no-fts', $this->getServerVersion() )->text();
        }
 
        /**
@@ -645,7 +645,7 @@ class DatabaseSqlite extends DatabaseBase {
                return false;
        }
 
-       function begin( $fname = '' ) {
+       protected function doBegin( $fname = '' ) {
                if ( $this->mTrxLevel == 1 ) {
                        $this->commit( __METHOD__ );
                }
@@ -653,7 +653,7 @@ class DatabaseSqlite extends DatabaseBase {
                $this->mTrxLevel = 1;
        }
 
-       function commit( $fname = '' ) {
+       protected function doCommit( $fname = '' ) {
                if ( $this->mTrxLevel == 0 ) {
                        return;
                }
@@ -661,7 +661,7 @@ class DatabaseSqlite extends DatabaseBase {
                $this->mTrxLevel = 0;
        }
 
-       function rollback( $fname = '' ) {
+       protected function doRollback( $fname = '' ) {
                if ( $this->mTrxLevel == 0 ) {
                        return;
                }
@@ -669,15 +669,6 @@ class DatabaseSqlite extends DatabaseBase {
                $this->mTrxLevel = 0;
        }
 
-       /**
-        * @param  $sql
-        * @param  $num
-        * @return string
-        */
-       function limitResultForUpdate( $sql, $num ) {
-               return $this->limitResult( $sql, $num );
-       }
-
        /**
         * @param $s string
         * @return string
@@ -827,8 +818,8 @@ class DatabaseSqlite extends DatabaseBase {
                }
                return $this->query( $sql, $fname );
        }
-       
-       
+
+
        /**
         * List all tables on the database
         *
@@ -843,21 +834,21 @@ class DatabaseSqlite extends DatabaseBase {
                        'name',
                        "type='table'"
                );
-               
+
                $endArray = array();
-               
-               foreach( $result as $table ) {  
+
+               foreach( $result as $table ) {
                        $vars = get_object_vars($table);
                        $table = array_pop( $vars );
-                       
+
                        if( !$prefix || strpos( $table, $prefix ) === 0 ) {
                                if ( strpos( $table, 'sqlite_' ) !== 0 ) {
                                        $endArray[] = $table;
                                }
-                               
+
                        }
                }
-               
+
                return $endArray;
        }