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'
return;
}
- $this->db = wfGetDB( DB_MASTER );
+ $this->db = $this->getDB( DB_MASTER );
if ( $this->db->getType() != 'sqlite' ) {
$this->error( "This maintenance script requires a SQLite database.\n" );
if ( !Sqlite::IsPresent() ) {
$this->error( "Error: SQLite support not found\n" );
}
- $files = array( $this->getOption( 'check-syntax' ) );
+ $files = [ $this->getOption( 'check-syntax' ) ];
$files += $this->mArgs;
$result = Sqlite::checkSqlSyntax( $files );
if ( $result === true ) {