Kill a bunch of unused $wgUser
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 28 Apr 2009 03:03:48 +0000 (03:03 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 28 Apr 2009 03:03:48 +0000 (03:03 +0000)
18 files changed:
includes/Article.php
includes/EditPage.php
includes/ImagePage.php
includes/Linker.php
includes/LogEventsList.php
includes/Title.php
includes/User.php
includes/api/ApiPatrol.php
includes/filerepo/LocalFile.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialRemoveRestrictions.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
languages/classes/LanguageWa.php

index 4c21c7b..1f30e87 100644 (file)
@@ -3569,7 +3569,7 @@ class Article {
         * @param $cache Boolean
         */
        public function outputWikiText( $text, $cache = true ) {
-               global $wgParser, $wgUser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
+               global $wgParser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
 
                $popts = $wgOut->parserOptions();
                $popts->setTidy(true);
index 6dbee62..16230f5 100644 (file)
@@ -352,7 +352,7 @@ class EditPage {
         * the newly-edited page.
         */
        function edit() {
-               global $wgOut, $wgUser, $wgRequest;
+               global $wgOut, $wgRequest;
                // Allow extensions to modify/prevent this form or submission
                if ( !wfRunHooks( 'AlternateEdit', array( &$this ) ) ) {
                        return;
index a6da109..612d2a6 100644 (file)
@@ -481,7 +481,7 @@ EOT
         * Show a notice that the file is from a shared repository
         */
        protected function printSharedImageText() {
-               global $wgOut, $wgUser;
+               global $wgOut;
 
                $this->loadFile();
 
index b3c98f7..9cbe815 100644 (file)
@@ -443,7 +443,6 @@ class Linker {
         * @param $prefix String: optional prefix. As trail, only before instead of after.
         */
        function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
-               global $wgUser;
                wfProfileIn( __METHOD__ );
 
                $query = wfCgiToArray( $query );
index ac6c9fc..b4b36f3 100644 (file)
@@ -774,7 +774,6 @@ class LogViewer {
         *     LogEventsList::NO_ACTION_LINK   Don't show restore/unblock/block links
         */
        function __construct( &$reader, $flags = 0 ) {
-               global $wgUser;
                wfDeprecated(__METHOD__);
                $this->reader =& $reader;
                $this->reader->pager->mLogEventsList->flags = $flags;
index b38cad9..3da5888 100644 (file)
@@ -2996,7 +2996,7 @@ class Title {
         *  arrays (errors) as values, or an error array with numeric indices if no pages were moved
         */
        public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true ) {
-               global $wgUser, $wgMaximumMovedPages;
+               global $wgMaximumMovedPages;
                // Check permissions
                if( !$this->userCan( 'move-subpages' ) )
                        return array( 'cant-move-subpages' );
index 12577f6..4ab5785 100644 (file)
@@ -2375,7 +2375,6 @@ class User {
         * Log this user out.
         */
        function logout() {
-               global $wgUser;
                if( wfRunHooks( 'UserLogout', array(&$this) ) ) {
                        $this->doLogout();
                }
index 19f3f1b..83dcbdb 100644 (file)
@@ -41,7 +41,7 @@ class ApiPatrol extends ApiBase {
         * Patrols the article or provides the reason the patrol failed.
         */
        public function execute() {
-               global $wgUser, $wgUseRCPatrol, $wgUseNPPatrol;
+               global $wgUser;
                $params = $this->extractRequestParams();
                
                if(!isset($params['token']))
index 321461d..d1ef4e2 100644 (file)
@@ -1398,7 +1398,7 @@ class LocalFileDeleteBatch {
         * Run the transaction
         */
        function execute() {
-               global $wgUser, $wgUseSquid;
+               global $wgUseSquid;
                wfProfileIn( __METHOD__ );
 
                $this->file->lock();
@@ -1540,7 +1540,7 @@ class LocalFileRestoreBatch {
         * So we save the batch and let the caller call cleanup()
         */
        function execute() {
-               global $wgUser, $wgLang;
+               global $wgLang;
                if ( !$this->all && !$this->ids ) {
                        // Do nothing
                        return $this->file->repo->newGood();
index 36f2020..835cce6 100644 (file)
@@ -473,7 +473,7 @@ class ContribsPager extends ReverseChronologicalPager {
         * @todo This would probably look a lot nicer in a table.
         */
        function formatRow( $row ) {
-               global $wgLang, $wgUser, $wgContLang;
+               global $wgLang, $wgContLang;
                wfProfileIn( __METHOD__ );
 
                $sk = $this->getSkin();
index 55dd43e..7882851 100644 (file)
@@ -108,7 +108,7 @@ class DeletedContribsPager extends IndexPager {
        function formatRow( $row ) {
                wfProfileIn( __METHOD__ );
 
-               global $wgLang, $wgUser;
+               global $wgLang;
 
                $sk = $this->getSkin();
 
index c51ce7c..ead8a3b 100644 (file)
@@ -67,7 +67,7 @@ class MergehistoryForm {
        }
 
        function execute() {
-               global $wgOut, $wgUser;
+               global $wgOut;
 
                $wgOut->setPagetitle( wfMsgHtml( "mergehistory" ) );
 
@@ -218,7 +218,7 @@ class MergehistoryForm {
        }
 
        function formatRevisionRow( $row ) {
-               global $wgUser, $wgLang;
+               global $wgLang;
 
                $rev = new Revision( $row );
 
@@ -270,7 +270,7 @@ class MergehistoryForm {
        }
 
        function merge() {
-               global $wgOut, $wgUser;
+               global $wgOut;
                # Get the titles directly from the IDs, in case the target page params
                # were spoofed. The queries are done based on the IDs, so it's best to
                # keep it consistent...
index 886c41a..e85238c 100644 (file)
@@ -247,7 +247,7 @@ class SpecialNewpages extends SpecialPage {
         * @return string
         */
        public function formatRow( $result ) {
-               global $wgLang, $wgContLang, $wgUser;
+               global $wgLang, $wgContLang;
 
                $classes = array();
                
index 75645e7..a3428a5 100644 (file)
@@ -46,7 +46,7 @@ function wfSpecialRemoveRestrictions() {
 }
 
 function wfSpecialRemoveRestrictionsProcess( $r ) {
-       global $wgUser, $wgRequest;
+       global $wgRequest;
        $reason = $wgRequest->getVal( 'reason' );
        $result = $r->delete();
        $log = new LogPage( 'restrict' );
index a9fa3b7..6c89d16 100644 (file)
@@ -833,7 +833,7 @@ class UndeleteForm {
         * @return string HTML
         */
        function showDiff( $previousRev, $currentRev ) {
-               global $wgOut, $wgUser;
+               global $wgOut;
 
                $diffEngine = new DifferenceEngine();
                $diffEngine->showDiffStyle();
index d8679cd..232064d 100644 (file)
@@ -288,7 +288,7 @@ class UploadForm {
         * @access private
         */
        function processUpload(){
-               global $wgUser, $wgOut, $wgFileExtensions, $wgLang;
+               global $wgOut, $wgFileExtensions, $wgLang;
                $details = null;
                $value = null;
                $value = $this->internalProcessUpload( $details );
index b065bdd..55615a9 100644 (file)
@@ -948,8 +948,6 @@ class LoginForm {
         * @private
         */
        function onCookieRedirectCheck( $type ) {
-               global $wgUser;
-
                if ( !$this->hasSessionCookie() ) {
                        if ( $type == 'new' ) {
                                return $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
index d97b202..3d117e5 100644 (file)
@@ -15,8 +15,6 @@ class LanguageWa extends Language {
        ### "<day> d' <monthname>" for months starting with a vowel
        ###
        function date( $ts, $adj = false, $format = true, $tc = false ) {
-               global $wgUser;
-
                if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
                $datePreference = $this->dateFormat( $format );