class UpdateRestrictions extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Updates page_restrictions table from old page_restriction column";
+ $this->addDescription( 'Updates page_restrictions table from old page_restriction column' );
$this->setBatchSize( 100 );
}
public function execute() {
- $db = wfGetDB( DB_MASTER );
+ $db = $this->getDB( DB_MASTER );
if ( !$db->tableExists( 'page_restrictions' ) ) {
$this->error( "page_restrictions table does not exist", true );
}