r112572 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112571‎ | r112572 | r112573 >
Date:02:57, 28 February 2012
Author:tstarling
Status:ok
Tags:
Comment:
MFT r112569: fix fatal error on [[Special:MovePage]]
Modified paths:
  • /branches/wmf/1.19wmf1/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/includes/specials/SpecialMovepage.php
@@ -55,6 +55,13 @@
5656 $oldTitleText = $request->getVal( 'wpOldTitle', $target );
5757 $this->oldTitle = Title::newFromText( $oldTitleText );
5858
 59+ if( is_null( $this->oldTitle ) ) {
 60+ throw new ErrorPageError( 'notargettitle', 'notargettext' );
 61+ }
 62+ if( !$this->oldTitle->exists() ) {
 63+ throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
 64+ }
 65+
5966 $newTitleTextMain = $request->getText( 'wpNewTitleMain' );
6067 $newTitleTextNs = $request->getInt( 'wpNewTitleNs', $this->oldTitle->getNamespace() );
6168 // Backwards compatibility for forms submitting here from other sources
@@ -64,12 +71,6 @@
6572 ? Title::newFromText( $newTitleText_bc )
6673 : Title::makeTitleSafe( $newTitleTextNs, $newTitleTextMain );
6774
68 - if( is_null( $this->oldTitle ) ) {
69 - throw new ErrorPageError( 'notargettitle', 'notargettext' );
70 - }
71 - if( !$this->oldTitle->exists() ) {
72 - throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
73 - }
7475
7576 $user = $this->getUser();
7677
Property changes on: branches/wmf/1.19wmf1/includes/specials/SpecialMovepage.php
___________________________________________________________________
Added: svn:mergeinfo
7778 Merged /branches/JSTesting/includes/specials/SpecialMovepage.php:r100352-107913
7879 Merged /branches/REL1_15/phase3/includes/specials/SpecialMovepage.php:r51646
7980 Merged /branches/sqlite/includes/specials/SpecialMovepage.php:r58211-58321
8081 Merged /trunk/phase3/includes/specials/SpecialMovepage.php:r111085,111128,111144,111251,112569
8182 Merged /branches/wmf-deployment/includes/specials/SpecialMovepage.php:r53381,56967

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112569Fix r110209: Move the invalid title check above the first use of the title ob...tstarling02:55, 28 February 2012

Status & tagging log