r55230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55229‎ | r55230 | r55231 >
Date:10:43, 18 August 2009
Author:simetrical
Status:ok
Tags:
Comment:
Fix fatal on every move over redirect, from r53659

Best not to call methods on variables until after you initialize them.
:)
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2857,12 +2857,13 @@
28582858 $newid = $nt->getArticleID();
28592859 $oldid = $this->getArticleID();
28602860 $latest = $this->getLatestRevID();
 2861+
 2862+ $dbw = wfGetDB( DB_MASTER );
 2863+
28612864 $rcts = $dbw->timestamp( $nt->getEarliestRevTime() );
28622865 $newns = $nt->getNamespace();
28632866 $newdbk = $nt->getDBkey();
28642867
2865 - $dbw = wfGetDB( DB_MASTER );
2866 -
28672868 # Delete the old redirect. We don't save it to history since
28682869 # by definition if we've got here it's rather uninteresting.
28692870 # We have to remove it so that the next step doesn't trigger

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53659(bug 16877) When moving a page over a redirect, delete the creation entry for...mrzman20:09, 22 July 2009

Status & tagging log