Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -97,21 +97,17 @@ |
98 | 98 | # when the form is first opened. |
99 | 99 | $newTitle = $this->oldTitle; |
100 | 100 | } |
101 | | - // WTF is this doing, passing title *object* to newFromUrl()?? |
102 | | - /*else { |
| 101 | + else { |
103 | 102 | if( empty($err) ) { |
104 | | - $nt = Title::newFromURL( $this->newTitle ); |
105 | | - if( $nt ) { |
106 | | - # If a title was supplied, probably from the move log revert |
107 | | - # link, check for validity. We can then show some diagnostic |
108 | | - # information and save a click. |
109 | | - $newerr = $this->oldTitle->isValidMoveOperation( $nt ); |
110 | | - if( is_string( $newerr ) ) { |
111 | | - $err = $newerr; |
112 | | - } |
| 103 | + # If a title was supplied, probably from the move log revert |
| 104 | + # link, check for validity. We can then show some diagnostic |
| 105 | + # information and save a click. |
| 106 | + $newerr = $this->oldTitle->isValidMoveOperation( $newTitle ); |
| 107 | + if( $newerr ) { |
| 108 | + $err = $newerr[0]; |
113 | 109 | } |
114 | 110 | } |
115 | | - }*/ |
| 111 | + } |
116 | 112 | |
117 | 113 | if ( !empty($err) && $err[0] == 'articleexists' && $wgUser->isAllowed( 'delete' ) ) { |
118 | 114 | $wgOut->addWikiMsg( 'delete_and_move_text', $newTitle->getPrefixedText() ); |