Index: trunk/phase3/includes/specials/SpecialUploadStash.php |
— | — | @@ -53,11 +53,11 @@ |
54 | 54 | return; |
55 | 55 | } |
56 | 56 | |
57 | | - if ( !isset( $subPage ) || $subPage === '' ) { |
| 57 | + if ( $subPage === null || $subPage === '' ) { |
58 | 58 | return $this->showUploads(); |
| 59 | + } else { |
| 60 | + return $this->showUpload( $subPage ); |
59 | 61 | } |
60 | | - |
61 | | - return $this->showUpload( $subPage ); |
62 | 62 | } |
63 | 63 | |
64 | 64 | |
— | — | @@ -68,10 +68,8 @@ |
69 | 69 | * @param $key String: the key of a particular requested file |
70 | 70 | */ |
71 | 71 | public function showUpload( $key ) { |
72 | | - global $wgOut; |
73 | | - |
74 | 72 | // prevent callers from doing standard HTML output -- we'll take it from here |
75 | | - $wgOut->disable(); |
| 73 | + $this->getOutput()->disable(); |
76 | 74 | |
77 | 75 | try { |
78 | 76 | $params = $this->parseKey( $key ); |
— | — | @@ -317,7 +315,6 @@ |
318 | 316 | * @param Status : $status - the result of processRequest |
319 | 317 | */ |
320 | 318 | private function showUploads( $status = null ) { |
321 | | - global $wgOut; |
322 | 319 | if ( $status === null ) { |
323 | 320 | $status = Status::newGood(); |
324 | 321 | } |
— | — | @@ -335,7 +332,7 @@ |
336 | 333 | 'default' => true, |
337 | 334 | 'name' => 'clear', |
338 | 335 | ) |
339 | | - ), 'clearStashedUploads' ); |
| 336 | + ), $this->getContext(), 'clearStashedUploads' ); |
340 | 337 | $form->setSubmitCallback( array( __CLASS__ , 'tryClearStashedUploads' ) ); |
341 | 338 | $form->setTitle( $this->getTitle() ); |
342 | 339 | $form->setSubmitText( wfMsg( 'uploadstash-clear' ) ); |
— | — | @@ -358,11 +355,11 @@ |
359 | 356 | $this->getTitle( "file/$file" )->getLocalURL() ), $file ) |
360 | 357 | ); |
361 | 358 | } |
362 | | - $wgOut->addHtml( Html::rawElement( 'ul', array(), $fileListItemsHtml ) ); |
| 359 | + $this->getOutput()->addHtml( Html::rawElement( 'ul', array(), $fileListItemsHtml ) ); |
363 | 360 | $form->displayForm( $formResult ); |
364 | | - $wgOut->addHtml( Html::rawElement( 'p', array(), $refreshHtml ) ); |
| 361 | + $this->getOutput()->addHtml( Html::rawElement( 'p', array(), $refreshHtml ) ); |
365 | 362 | } else { |
366 | | - $wgOut->addHtml( Html::rawElement( 'p', array(), |
| 363 | + $this->getOutput()->addHtml( Html::rawElement( 'p', array(), |
367 | 364 | Html::element( 'span', array(), wfMsg( 'uploadstash-nofiles' ) ) |
368 | 365 | . ' ' |
369 | 366 | . $refreshHtml |