http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95109

Revision: 95109
Author:   ialex
Date:     2011-08-20 20:12:46 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Use local context instead of global variables

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialRandompage.php

Modified: trunk/phase3/includes/specials/SpecialRandompage.php
===================================================================
--- trunk/phase3/includes/specials/SpecialRandompage.php        2011-08-20 
19:55:50 UTC (rev 95108)
+++ trunk/phase3/includes/specials/SpecialRandompage.php        2011-08-20 
20:12:46 UTC (rev 95109)
@@ -54,9 +54,9 @@
        }
 
        public function execute( $par ) {
-               global $wgOut, $wgContLang, $wgRequest;
+               global $wgContLang;
 
-               if ($par) {
+               if ( $par ) {
                        $this->setNamespace( $wgContLang->getNsIndex( $par ) );
                }
 
@@ -64,15 +64,15 @@
 
                if( is_null( $title ) ) {
                        $this->setHeaders();
-                       $wgOut->addWikiMsg( strtolower( $this->getName() ) . 
'-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 ) );
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to