* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that checks for articles to fix after
/**
* Get the interwiki list
*
- * @todo Needs to respect interwiki cache!
* @return Array
*/
private function getInterwikiList() {
- $result = $this->db->select( 'interwiki', array( 'iw_prefix' ) );
+ $result = Interwiki::getAllPrefixes();
$prefixes = array();
foreach ( $result as $row ) {
- $prefixes[] = $row->iw_prefix;
+ $prefixes[] = $row['iw_prefix'];
}
return $prefixes;
}
}
/**
- * @todo: do this for reals
+ * @todo Do this for real
* @param $key
* @param $prefix
* @param $fix
* @return array
*/
private function getConflicts( $ns, $name ) {
- $page = 'page';
+ $page = 'page';
$table = $this->db->tableName( $page );
- $prefix = $this->db->strencode( $name );
+ $prefix = $this->db->strencode( $name );
$encNamespace = $this->db->addQuotes( $ns );
$titleSql = "TRIM(LEADING '$prefix:' FROM {$page}_title)";
$this->db->update( $table,
array(
"{$prefix}_namespace" => $newTitle->getNamespace(),
- "{$prefix}_title" => $newTitle->getDBkey(),
+ "{$prefix}_title" => $newTitle->getDBkey(),
),
array(
// "{$prefix}_namespace" => 0,
- // "{$prefix}_title" => $row->oldtitle,
- "{$prefix}_id" => $row->id,
+ // "{$prefix}_title" => $row->oldtitle,
+ "{$prefix}_id" => $row->id,
),
__METHOD__ );
$this->output( "ok.\n" );
}
$maintClass = "NamespaceConflictChecker";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;