class UpdateMediaWiki extends Maintenance {
function __construct() {
parent::__construct();
- $this->mDescription = "MediaWiki database updater";
+ $this->addDescription( 'MediaWiki database updater' );
$this->addOption( 'skip-compat-checks', 'Skips compatibility checks, mostly for developers' );
$this->addOption( 'quick', 'Skip 5 second countdown before starting' );
$this->addOption( 'doshared', 'Also update shared tables' );
# Attempt to connect to the database as a privileged user
# This will vomit up an error if there are permissions problems
- $db = wfGetDB( DB_MASTER );
+ $db = $this->getDB( DB_MASTER );
$this->output( "Going to run database updates for " . wfWikiID() . "\n" );
if ( $db->getType() === 'sqlite' ) {