diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
commit | d9022f63880ce039446fba8364f68e656b7bf4cb (patch) | |
tree | 16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/specials/SpecialRandompage.php | |
parent | 27cf83d177256813e2e802241085fce5dd0f3fb9 (diff) |
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/specials/SpecialRandompage.php')
-rw-r--r-- | includes/specials/SpecialRandompage.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index e299dc77..0b6239bb 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -33,8 +33,7 @@ class RandomPage extends SpecialPage { protected $extra = array(); // Extra SQL statements public function __construct( $name = 'Randompage' ){ - global $wgContentNamespaces; - $this->namespaces = $wgContentNamespaces; + $this->namespaces = MWNamespace::getContentNamespaces(); parent::__construct( $name ); } @@ -55,9 +54,9 @@ class RandomPage extends SpecialPage { } public function execute( $par ) { - global $wgOut, $wgContLang, $wgRequest; + global $wgContLang; - if ($par) { + if ( $par ) { $this->setNamespace( $wgContLang->getNsIndex( $par ) ); } @@ -65,15 +64,15 @@ class RandomPage extends SpecialPage { if( is_null( $title ) ) { $this->setHeaders(); - $wgOut->addWikiMsg( strtolower( $this->mName ) . '-nopages', + $this->getOutput()->addWikiMsg( strtolower( $this->getName() ) . '-nopages', $this->getNsList(), count( $this->namespaces ) ); return; } $redirectParam = $this->isRedirect() ? array( 'redirect' => 'no' ) : array(); - $query = array_merge( $wgRequest->getValues(), $redirectParam ); + $query = array_merge( $this->getRequest()->getValues(), $redirectParam ); unset( $query['title'] ); - $wgOut->redirect( $title->getFullUrl( $query ) ); + $this->getOutput()->redirect( $title->getFullUrl( $query ) ); } /** |