Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -532,7 +532,8 @@ |
533 | 533 | } |
534 | 534 | |
535 | 535 | public static function replaceMovePage( &$list ) { |
536 | | - $list['Movepage'] = 'SpecialPageTranslationMovePage'; |
| 536 | + $old = is_array( $list['Movepage'] ); |
| 537 | + $list['Movepage'] = array( 'SpecialPageTranslationMovePage', $old ); |
537 | 538 | return true; |
538 | 539 | } |
539 | 540 | |
Index: trunk/extensions/Translate/tag/SpecialPageTranslationMovePage.php |
— | — | @@ -46,8 +46,14 @@ |
47 | 47 | */ |
48 | 48 | protected $user; |
49 | 49 | |
50 | | - public function __construct() { |
| 50 | + /** |
| 51 | + * Whether MovePageForm extends SpecialPage |
| 52 | + */ |
| 53 | + protected $old; |
| 54 | + |
| 55 | + public function __construct( $old ) { |
51 | 56 | parent::__construct( 'Movepage' ); |
| 57 | + $this->old = $old; |
52 | 58 | } |
53 | 59 | |
54 | 60 | /* |
— | — | @@ -118,7 +124,11 @@ |
119 | 125 | |
120 | 126 | } else { |
121 | 127 | // Delegate... don't want to reimplement this |
122 | | - $this->doNormalMovePage( $par ); |
| 128 | + if ( $this->old ) { |
| 129 | + $this->doOldNormalMovePage(); |
| 130 | + } else { |
| 131 | + $this->doNormalMovePage( $par ); |
| 132 | + } |
123 | 133 | } |
124 | 134 | } |
125 | 135 | |
— | — | @@ -160,6 +170,16 @@ |
161 | 171 | $sp->execute( $par ); |
162 | 172 | } |
163 | 173 | |
| 174 | + protected function doOldNormalMovePage() { |
| 175 | + global $wgRequest; |
| 176 | + $form = new MovePageForm( $this->oldTitle, $this->newTitle ); |
| 177 | + if ( 'submit' == $wgRequest->getVal( 'action' ) && $this->checkToken() && $wgRequest->wasPosted() ) { |
| 178 | + $form->doSubmit(); |
| 179 | + } else { |
| 180 | + $form->showForm( '' ); |
| 181 | + } |
| 182 | + } |
| 183 | + |
164 | 184 | /** |
165 | 185 | * Checks token. Use before real actions happen. Have to use wpEditToken |
166 | 186 | * for compatibility for SpecialMovepage.php. |