Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -55,6 +55,13 @@ |
56 | 56 | $oldTitleText = $request->getVal( 'wpOldTitle', $target ); |
57 | 57 | $this->oldTitle = Title::newFromText( $oldTitleText ); |
58 | 58 | |
| 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 | + |
59 | 66 | $newTitleTextMain = $request->getText( 'wpNewTitleMain' ); |
60 | 67 | $newTitleTextNs = $request->getInt( 'wpNewTitleNs', $this->oldTitle->getNamespace() ); |
61 | 68 | // Backwards compatibility for forms submitting here from other sources |
— | — | @@ -64,12 +71,6 @@ |
65 | 72 | ? Title::newFromText( $newTitleText_bc ) |
66 | 73 | : Title::makeTitleSafe( $newTitleTextNs, $newTitleTextMain ); |
67 | 74 | |
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 | | - } |
74 | 75 | |
75 | 76 | $user = $this->getUser(); |
76 | 77 | |