class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Fixes any entries in the externallinks table containing protocol-relative URLs";
+ $this->mDescription =
+ "Fixes any entries in the externallinks table containing protocol-relative URLs";
}
protected function getUpdateKey() {
$db = wfGetDB( DB_MASTER );
if ( !$db->tableExists( 'externallinks' ) ) {
$this->error( "externallinks table does not exist" );
+
return false;
}
$this->output( "Fixing protocol-relative entries in the externallinks table...\n" );
)
), __METHOD__, array( 'IGNORE' )
);
- $db->delete( 'externallinks', array( 'el_index' => $row->el_index, 'el_from' => $row->el_from, 'el_to' => $row->el_to ), __METHOD__ );
+ $db->delete(
+ 'externallinks',
+ array(
+ 'el_index' => $row->el_index,
+ 'el_from' => $row->el_from,
+ 'el_to' => $row->el_to
+ ),
+ __METHOD__
+ );
}
$this->output( "Done, $count rows updated.\n" );
+
return true;
}
}