X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fsqlite.php;h=edc9e145ac2f098abede13667d7ab5a1453f2af8;hb=8e71bae8fa1e56f3b4217c8f709d6a7f25d84ca6;hp=8a785245ac9195bf1a5f31f99e381c0c710e6723;hpb=7ab280ca486e3fef0fd1cbdbc18017d9455f04a1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index 8a785245ac..edc9e145ac 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -32,7 +32,10 @@ class SqliteMaintenance extends Maintenance { public function __construct() { parent::__construct(); $this->mDescription = "Performs some operations specific to SQLite database backend"; - $this->addOption( 'vacuum', 'Clean up database by removing deleted pages. Decreases database file size' ); + $this->addOption( + 'vacuum', + 'Clean up database by removing deleted pages. Decreases database file size' + ); $this->addOption( 'integrity', 'Check database for integrity' ); $this->addOption( 'backup-to', 'Backup database to the given file', false, true ); $this->addOption( 'check-syntax', 'Check SQL file(s) for syntax errors', false, true ); @@ -52,6 +55,7 @@ class SqliteMaintenance extends Maintenance { // Should work even if we use a non-SQLite database if ( $this->hasOption( 'check-syntax' ) ) { $this->checkSyntax(); + return; } @@ -59,6 +63,7 @@ class SqliteMaintenance extends Maintenance { if ( $this->db->getType() != 'sqlite' ) { $this->error( "This maintenance script requires a SQLite database.\n" ); + return; } @@ -98,6 +103,7 @@ class SqliteMaintenance extends Maintenance { if ( !$res || $res->numRows() == 0 ) { $this->error( "Error: integrity check query returned nothing.\n" ); + return; }