X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fsqlite.php;h=b11f1c8ba6d7a5d834c1caccaaeb79e158077604;hb=11a37d24fb131f6f42c51e51b59c2422d199d6d2;hp=edc9e145ac2f098abede13667d7ab5a1453f2af8;hpb=bd4484b72f323fed599ee99c53f2bef8ef881a0c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index edc9e145ac..b11f1c8ba6 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -81,7 +81,7 @@ class SqliteMaintenance extends Maintenance { } private function vacuum() { - $prevSize = filesize( $this->db->mDatabaseFile ); + $prevSize = filesize( $this->db->getDbFilePath() ); if ( $prevSize == 0 ) { $this->error( "Can't vacuum an empty database.\n", true ); } @@ -89,7 +89,7 @@ class SqliteMaintenance extends Maintenance { $this->output( 'VACUUM: ' ); if ( $this->db->query( 'VACUUM' ) ) { clearstatcache(); - $newSize = filesize( $this->db->mDatabaseFile ); + $newSize = filesize( $this->db->getDbFilePath() ); $this->output( sprintf( "Database size was %d, now %d (%.1f%% reduction).\n", $prevSize, $newSize, ( $prevSize - $newSize ) * 100.0 / $prevSize ) ); } else { @@ -115,14 +115,14 @@ class SqliteMaintenance extends Maintenance { private function backup( $fileName ) { $this->output( "Backing up database:\n Locking..." ); $this->db->query( 'BEGIN IMMEDIATE TRANSACTION', __METHOD__ ); - $ourFile = $this->db->mDatabaseFile; + $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__ ); }