jquery.tablesorter.less: Simplify by using less syntax
[lhc/web/wiklou.git] / maintenance / sqlite.php
index 96a8a38..fbde417 100644 (file)
@@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php';
 class SqliteMaintenance extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Performs some operations specific to SQLite database backend";
+               $this->addDescription( 'Performs some operations specific to SQLite database backend' );
                $this->addOption(
                        'vacuum',
                        'Clean up database by removing deleted pages. Decreases database file size'
@@ -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: ' );
@@ -128,11 +128,11 @@ class SqliteMaintenance extends Maintenance {
        }
 
        private function checkSyntax() {
-               if ( !Sqlite::IsPresent() ) {
+               if ( !Sqlite::isPresent() ) {
                        $this->error( "Error: SQLite support not found\n" );
                }
-               $files = array( $this->getOption( 'check-syntax' ) );
-               $files += $this->mArgs;
+               $files = [ $this->getOption( 'check-syntax' ) ];
+               $files = array_merge( $files, $this->mArgs );
                $result = Sqlite::checkSqlSyntax( $files );
                if ( $result === true ) {
                        $this->output( "SQL syntax check: no errors detected.\n" );