Update wfGetDB calls in Maintenance scripts to use getDB()
[lhc/web/wiklou.git] / maintenance / sqlite.php
index 7e02a4b..96a8a38 100644 (file)
@@ -59,7 +59,7 @@ class SqliteMaintenance extends Maintenance {
                        return;
                }
 
-               $this->db = wfGetDB( DB_MASTER );
+               $this->db = $this->getDB( DB_MASTER );
 
                if ( $this->db->getType() != 'sqlite' ) {
                        $this->error( "This maintenance script requires a SQLite database.\n" );
@@ -117,12 +117,12 @@ class SqliteMaintenance extends Maintenance {
                $this->db->query( 'BEGIN IMMEDIATE TRANSACTION', __METHOD__ );
                $ourFile = $this->db->getDbFilePath();
                $this->output( "   Copying database file $ourFile to $fileName... " );
-               wfSuppressWarnings( false );
+               MediaWiki\suppressWarnings( false );
                if ( !copy( $ourFile, $fileName ) ) {
                        $err = error_get_last();
                        $this->error( "      {$err['message']}" );
                }
-               wfSuppressWarnings( true );
+               MediaWiki\suppressWarnings( true );
                $this->output( "   Releasing lock...\n" );
                $this->db->query( 'COMMIT TRANSACTION', __METHOD__ );
        }