summaryrefslogtreecommitdiff
path: root/maintenance/sqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/sqlite.php')
-rw-r--r--maintenance/sqlite.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php
index 13d136d8..dc8a430e 100644
--- a/maintenance/sqlite.php
+++ b/maintenance/sqlite.php
@@ -41,20 +41,19 @@ class SqliteMaintenance extends Maintenance {
}
public function execute() {
- global $wgDBtype;
-
// Should work even if we use a non-SQLite database
if ( $this->hasOption( 'check-syntax' ) ) {
$this->checkSyntax();
+ return;
}
- if ( $wgDBtype != 'sqlite' ) {
+ $this->db = wfGetDB( DB_MASTER );
+
+ if ( $this->db->getType() != 'sqlite' ) {
$this->error( "This maintenance script requires a SQLite database.\n" );
return;
}
- $this->db = wfGetDB( DB_MASTER );
-
if ( $this->hasOption( 'vacuum' ) ) {
$this->vacuum();
}