X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fsqlite.php;h=bfd4d971cbcff53c569cd3b0ce482213a8941954;hb=228d796b1d6299ccd39418e85f40437292b47dd4;hp=e74a86cf6961495a2e114af6ff3cef406aeabbf6;hpb=64b83bdb3afd0ee4f8fc1893a865409c198e601e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index e74a86cf69..bfd4d971cb 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -83,7 +83,7 @@ class SqliteMaintenance extends Maintenance { private function vacuum() { $prevSize = filesize( $this->db->getDbFilePath() ); if ( $prevSize == 0 ) { - $this->error( "Can't vacuum an empty database.\n", true ); + $this->fatalError( "Can't vacuum an empty database.\n" ); } $this->output( 'VACUUM: ' ); @@ -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... " ); - MediaWiki\suppressWarnings( false ); + Wikimedia\suppressWarnings(); if ( !copy( $ourFile, $fileName ) ) { $err = error_get_last(); $this->error( " {$err['message']}" ); } - MediaWiki\suppressWarnings( true ); + Wikimedia\restoreWarnings(); $this->output( " Releasing lock...\n" ); $this->db->query( 'COMMIT TRANSACTION', __METHOD__ ); } @@ -142,5 +142,5 @@ class SqliteMaintenance extends Maintenance { } } -$maintClass = "SqliteMaintenance"; +$maintClass = SqliteMaintenance::class; require_once RUN_MAINTENANCE_IF_MAIN;