public function __construct() {
parent::__construct();
- $this->mDescription = "Script to clean up broken, unparseable upload filenames";
+ $this->addDescription( 'Script to clean up broken, unparseable upload filenames' );
}
protected function processRow( $row ) {
$this->output( "DRY RUN: would delete bogus row '$name'\n" );
} else {
$this->output( "deleting bogus row '$name'\n" );
- $db = wfGetDB( DB_MASTER );
+ $db = $this->getDB( DB_MASTER );
$db->delete( 'image',
array( 'img_name' => $name ),
__METHOD__ );
return;
}
- $db = wfGetDB( DB_MASTER );
+ $db = $this->getDB( DB_MASTER );
/*
* To prevent key collisions in the update() statements below,