From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/specials/SpecialFilepath.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'includes/specials/SpecialFilepath.php') diff --git a/includes/specials/SpecialFilepath.php b/includes/specials/SpecialFilepath.php index 08f90fd2..101a33f4 100644 --- a/includes/specials/SpecialFilepath.php +++ b/includes/specials/SpecialFilepath.php @@ -33,12 +33,11 @@ class SpecialFilepath extends SpecialPage { } function execute( $par ) { - global $wgRequest, $wgOut; - $this->setHeaders(); $this->outputHeader(); - $file = !is_null( $par ) ? $par : $wgRequest->getText( 'file' ); + $request = $this->getRequest(); + $file = !is_null( $par ) ? $par : $request->getText( 'file' ); $title = Title::newFromText( $file, NS_FILE ); @@ -50,8 +49,8 @@ class SpecialFilepath extends SpecialPage { if ( $file && $file->exists() ) { // Default behaviour: Use the direct link to the file. $url = $file->getURL(); - $width = $wgRequest->getInt( 'width', -1 ); - $height = $wgRequest->getInt( 'height', -1 ); + $width = $request->getInt( 'width', -1 ); + $height = $request->getInt( 'height', -1 ); // If a width is requested... if ( $width != -1 ) { @@ -62,9 +61,9 @@ class SpecialFilepath extends SpecialPage { $url = $mto->getURL(); } } - $wgOut->redirect( $url ); + $this->getOutput()->redirect( $url ); } else { - $wgOut->setStatusCode( 404 ); + $this->getOutput()->setStatusCode( 404 ); $this->showForm( $title ); } } @@ -74,9 +73,9 @@ class SpecialFilepath extends SpecialPage { * @param $title Title */ function showForm( $title ) { - global $wgOut, $wgScript; + global $wgScript; - $wgOut->addHTML( + $this->getOutput()->addHTML( Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'specialfilepath' ) ) . Html::openElement( 'fieldset' ) . Html::element( 'legend', null, wfMsg( 'filepath' ) ) . -- cgit v1.2.3-54-g00ecf