r11177 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11176‎ | r11177 | r11178 >
Date:12:42, 2 October 2005
Author:vibber
Status:old
Tags:
Comment:
boo ba biz bax TRYING TO TYPE go back to sleep dude
Modified paths:
  • /trunk/phase3/maintenance/cleanupTitles.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/cleanupTitles.php
@@ -179,16 +179,22 @@
180180 if( is_null( $title ) ) {
181181 die( "Something awry; empty title.\n" );
182182 }
 183+ $ns = $title->getNamespace();
183184 $dest = $title->getDbKey();
184185 if( $this->dryrun ) {
185186 $this->log( "DRY RUN: would rename $row->page_id ($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')" );
186187 } else {
187 - $this->log( "renaming $row->page_id ($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')" );
 188+ $this->log( "renaming $row->page_id ($row->page_namespace,'$row->page_title') to ($ns,'$dest')" );
188189 $dbw =& wfGetDB( DB_MASTER );
189190 $dbw->update( 'page',
190 - array( 'page_title' => $dest ),
 191+ array(
 192+ 'page_namespace' => $ns,
 193+ 'page_title' => $dest
 194+ ),
191195 array( 'page_id' => $row->page_id ),
192196 'cleanupTitles::moveInconsistentPage' );
 197+ global $wgLinkCache;
 198+ $wgLinkCache->clear();
193199 }
194200 }
195201

Status & tagging log