Index: trunk/phase3/includes/specials/SpecialFilepath.php |
— | — | @@ -33,12 +33,11 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | function execute( $par ) { |
37 | | - global $wgRequest, $wgOut; |
38 | | - |
39 | 37 | $this->setHeaders(); |
40 | 38 | $this->outputHeader(); |
41 | 39 | |
42 | | - $file = !is_null( $par ) ? $par : $wgRequest->getText( 'file' ); |
| 40 | + $request = $this->getRequest(); |
| 41 | + $file = !is_null( $par ) ? $par : $request->getText( 'file' ); |
43 | 42 | |
44 | 43 | $title = Title::makeTitleSafe( NS_FILE, $file ); |
45 | 44 | |
— | — | @@ -50,8 +49,8 @@ |
51 | 50 | if ( $file && $file->exists() ) { |
52 | 51 | // Default behaviour: Use the direct link to the file. |
53 | 52 | $url = $file->getURL(); |
54 | | - $width = $wgRequest->getInt( 'width', -1 ); |
55 | | - $height = $wgRequest->getInt( 'height', -1 ); |
| 53 | + $width = $request->getInt( 'width', -1 ); |
| 54 | + $height = $request->getInt( 'height', -1 ); |
56 | 55 | |
57 | 56 | // If a width is requested... |
58 | 57 | if ( $width != -1 ) { |
— | — | @@ -62,9 +61,9 @@ |
63 | 62 | $url = $mto->getURL(); |
64 | 63 | } |
65 | 64 | } |
66 | | - $wgOut->redirect( $url ); |
| 65 | + $this->getOutput()->redirect( $url ); |
67 | 66 | } else { |
68 | | - $wgOut->setStatusCode( 404 ); |
| 67 | + $this->getOutput()->setStatusCode( 404 ); |
69 | 68 | $this->showForm( $title ); |
70 | 69 | } |
71 | 70 | } |
— | — | @@ -74,9 +73,9 @@ |
75 | 74 | * @param $title Title |
76 | 75 | */ |
77 | 76 | function showForm( $title ) { |
78 | | - global $wgOut, $wgScript; |
| 77 | + global $wgScript; |
79 | 78 | |
80 | | - $wgOut->addHTML( |
| 79 | + $this->getOutput()->addHTML( |
81 | 80 | Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' ) ) . |
82 | 81 | Html::openElement( 'fieldset' ) . |
83 | 82 | Html::element( 'legend', null, wfMsg( 'filepath' ) ) . |