Removal of unused globals
authorSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 19:11:52 +0000 (19:11 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 19:11:52 +0000 (19:11 +0000)
Removal of one setting of a variable to '', then not using further

59 files changed:
includes/CategoryPage.php
includes/ChangesFeed.php
includes/EditPage.php
includes/Exception.php
includes/FileRevertForm.php
includes/ForkController.php
includes/GlobalFunctions.php
includes/HTMLFileCache.php
includes/Html.php
includes/ImagePage.php
includes/LinkCache.php
includes/Linker.php
includes/LogEventsList.php
includes/MagicWord.php
includes/Metadata.php
includes/OutputPage.php
includes/Preferences.php
includes/ProfilerSimpleText.php
includes/RawPage.php
includes/Skin.php
includes/SkinTemplate.php
includes/StreamFile.php
includes/Title.php
includes/User.php
includes/UserMailer.php
includes/UserRightsProxy.php
includes/WikiMap.php
includes/db/Database.php
includes/db/DatabaseOracle.php
includes/db/LoadBalancer.php
includes/filerepo/FileRepo.php
includes/installer/CoreInstaller.php
includes/installer/SqliteInstaller.php
includes/parser/Parser.php
includes/search/SearchEngine.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialExport.php
includes/specials/SpecialImport.php
includes/specials/SpecialIpblocklist.php
includes/specials/SpecialLinkSearch.php
includes/specials/SpecialListusers.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialRevisionMove.php
includes/specials/SpecialSearch.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWatchlist.php
includes/specials/SpecialWithoutinterwiki.php
includes/upload/UploadFromUrl.php

index 5762331..447a141 100644 (file)
@@ -85,7 +85,7 @@ class CategoryViewer {
         * @private
         */
        function getHTML() {
-               global $wgOut, $wgCategoryMagicGallery, $wgCategoryPagingLimit, $wgContLang;
+               global $wgOut, $wgCategoryMagicGallery, $wgContLang;
                wfProfileIn( __METHOD__ );
 
                $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
index 4a5a2d1..5e0ebb1 100644 (file)
@@ -45,8 +45,7 @@ class ChangesFeed {
         * @return null or true
         */
        public function execute( $feed, $rows, $lastmod, $opts ) {
-               global $messageMemc, $wgFeedCacheTimeout;
-               global $wgSitename, $wgLang, $wgRenderHashAppend;
+               global $wgLang, $wgRenderHashAppend;
 
                if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
                        return;
index 2cc94d5..ab60acb 100644 (file)
@@ -765,7 +765,7 @@ class EditPage {
         * @return one of the constants describing the result
         */
        function internalAttemptSave( &$result, $bot = false ) {
-               global $wgFilterCallback, $wgUser, $wgOut, $wgParser;
+               global $wgFilterCallback, $wgUser, $wgParser;
                global $wgMaxArticleSize;
 
                wfProfileIn( __METHOD__  );
@@ -1848,7 +1848,7 @@ INPUTS
         * @return string
         */
        function getPreviewText() {
-               global $wgOut, $wgUser, $wgTitle, $wgParser, $wgLang, $wgContLang, $wgMessageCache;
+               global $wgOut, $wgUser, $wgParser, $wgMessageCache;
 
                wfProfileIn( __METHOD__ );
 
index ddcd739..fe60fa3 100644 (file)
@@ -197,7 +197,7 @@ class MWException extends Exception {
         * $wgOut to output the exception.
         */
        function htmlHeader() {
-               global $wgLogo, $wgSitename, $wgOutputEncoding;
+               global $wgLogo, $wgOutputEncoding;
 
                if ( !headers_sent() ) {
                        header( 'HTTP/1.0 500 Internal Server Error' );
index eb16693..2902734 100644 (file)
@@ -88,7 +88,7 @@ class FileRevertForm {
         * Show the confirmation form
         */
        protected function showForm() {
-               global $wgOut, $wgUser, $wgRequest, $wgLang, $wgContLang;
+               global $wgOut, $wgUser, $wgLang, $wgContLang;
                $timestamp = $this->getTimestamp();
 
                $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getAction() ) );
index 7b88922..e5b44c2 100644 (file)
@@ -126,8 +126,6 @@ class ForkController {
         * Fork a number of worker processes.
         */
        protected function forkWorkers( $numProcs ) {
-               global $wgMemc, $wgCaches, $wgMainCacheType;
-
                $this->prepareEnvironment();
 
                // Create the child processes
index ea3bf6e..d0c3a42 100644 (file)
@@ -704,7 +704,7 @@ function wfMsgWeirdKey( $key ) {
  * @return string
  */
 function wfMsgGetKey( $key, $useDB, $langCode = false, $transform = true ) {
-       global $wgContLang, $wgMessageCache;
+       global $wgMessageCache;
 
        wfRunHooks('NormalizeMessageKey', array(&$key, &$useDB, &$langCode, &$transform));
        
@@ -2060,7 +2060,7 @@ function wfGetNamespaceNotice() {
 }
 
 function wfGetSiteNotice() {
-       global $wgUser, $wgSiteNotice;
+       global $wgUser;
        $fname = 'wfGetSiteNotice';
        wfProfileIn( $fname );
        $siteNotice = '';
index 1e1ba0d..8990fd9 100644 (file)
@@ -30,7 +30,7 @@ class HTMLFileCache {
 
        public function fileCacheName() {
                if( !$this->mFileCache ) {
-                       global $wgCacheDirectory, $wgFileCacheDirectory, $wgRequest;
+                       global $wgCacheDirectory, $wgFileCacheDirectory;
 
                        if ( $wgFileCacheDirectory ) {
                                $dir = $wgFileCacheDirectory;
index e2bf59d..f388489 100644 (file)
@@ -595,7 +595,7 @@ class Html {
                        $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
                }
 
-               global $wgHtml5, $wgHtml5Version, $wgWellFormedXml, $wgDocType, $wgDTD;
+               global $wgHtml5, $wgHtml5Version, $wgDocType, $wgDTD;
                global $wgXhtmlNamespaces, $wgXhtmlDefaultNamespace;
                if ( $wgHtml5 ) {
                        $ret .= "<!DOCTYPE html>\n";
index 1e78739..c278070 100644 (file)
@@ -143,7 +143,6 @@ class ImagePage extends Article {
                        $wgOut->addHTML( $html );
 
                if ( $showmeta ) {
-                       global $wgStylePath, $wgStyleVersion;
                        $expand = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-expand' ) ) );
                        $collapse = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-collapse' ) ) );
                        $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ) . "\n" );
@@ -880,7 +879,7 @@ class ImageHistoryList {
        }
 
        public function imageHistoryLine( $iscur, $file ) {
-               global $wgUser, $wgLang, $wgContLang;
+               global $wgUser, $wgLang;
 
                $timestamp = wfTimestamp( TS_MW, $file->getTimestamp() );
                $img = $iscur ? $file->getName() : $file->getArchiveName();
index 4b6f964..dce3459 100644 (file)
@@ -132,7 +132,7 @@ class LinkCache {
         * @return Integer
         */
        public function addLinkObj( $nt ) {
-               global $wgAntiLockFlags, $wgProfiler;
+               global $wgAntiLockFlags;
                wfProfileIn( __METHOD__ );
 
                $key = $nt->getPrefixedDBkey();
index ebe0401..008b9b8 100644 (file)
@@ -583,7 +583,7 @@ class Linker {
        }
 
        function makeThumbLink2( Title $title, $file, $frameParams = array(), $handlerParams = array(), $time = false, $query = "" ) {
-               global $wgStylePath, $wgContLang;
+               global $wgStylePath;
                $exists = $file && $file->exists();
 
                # Shortcuts
index 599ef5c..9a58362 100644 (file)
@@ -357,7 +357,7 @@ class LogEventsList {
 
        // @TODO: split up!
        private function logActionLinks( $row, $title, $paramArray, &$comment ) {
-               global $wgUser, $wgLang;
+               global $wgUser;
                if( ( $this->flags & self::NO_ACTION_LINK ) // we don't want to see the action
                        || self::isDeleted( $row, LogPage::DELETED_ACTION ) ) // action is hidden
                {
@@ -913,7 +913,6 @@ class LogPager extends ReverseChronologicalPager {
        }
 
        public function getQueryInfo() {
-               global $wgOut;
                $tables = array( 'logging', 'user' );
                $this->mConds[] = 'user_id = log_user';
                $index = array();
index d05bf19..dfc3e4f 100644 (file)
@@ -514,7 +514,6 @@ class MagicWordArray {
         * Add a magic word by name
         */
        public function add( $name ) {
-               global $wgContLang;
                $this->names[] = $name;
                $this->hash = $this->baseRegex = $this->regex = null;
        }
@@ -657,7 +656,6 @@ class MagicWordArray {
         * Both elements are false if there was no match.
         */
        public function matchVariableStartToEnd( $text ) {
-               global $wgContLang;
                $regexes = $this->getVariableStartToEndRegex();
                foreach ( $regexes as $regex ) {
                        if ( $regex !== '' ) {
index 3f95954..f3b32e0 100644 (file)
@@ -115,8 +115,6 @@ abstract class RdfMetaData {
        }
 
        protected function person($name, User $user ){
-               global $wgContLang;
-
                if( $user->isAnon() ){
                        $this->element( $name, wfMsgExt( 'anonymous', array( 'parsemag' ), 1 ) );
                } else if( $real = $user->getRealName() ) {
index 7654025..a9ea83b 100644 (file)
@@ -2090,8 +2090,8 @@ class OutputPage {
         * @return String: The doctype, opening <html>, and head element.
         */
        public function headElement( Skin $sk, $includeStyle = true ) {
-               global $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
-               global $wgContLang, $wgUseTrackbacks, $wgStyleVersion, $wgHtml5;
+               global $wgOutputEncoding, $wgMimeType;
+               global $wgUseTrackbacks, $wgHtml5;
                global $wgUser, $wgRequest, $wgLang;
 
                if ( $sk->commonPrintStylesheet() ) {
index d10a406..bd7511a 100644 (file)
@@ -35,8 +35,6 @@ class Preferences {
                if ( self::$defaultPreferences )
                        return self::$defaultPreferences;
 
-               global $wgRCMaxAge;
-
                $defaultPreferences = array();
 
                self::profilePreferences( $user, $defaultPreferences );
@@ -62,7 +60,6 @@ class Preferences {
                }
 
                ## Prod in defaults from the user
-               global $wgDefaultUserOptions;
                foreach ( $defaultPreferences as $name => &$info ) {
                        $prefFromUser = self::getOptionFromUser( $name, $info, $user );
                        $field = HTMLForm::loadInputFromParameters( $info ); // For validation
index caca94b..db4b605 100644 (file)
@@ -22,8 +22,6 @@ class ProfilerSimpleText extends ProfilerSimple {
        static private $out;
 
        function getFunctionReport() {
-               global $wgRequest, $wgOut;
-
                if($this->mTemplated) {
                        uasort($this->mCollated,array('self','sort'));
                        array_walk($this->mCollated,array('self','format'));
index 8e515af..1d1b9d0 100644 (file)
@@ -109,7 +109,7 @@ class RawPage {
        }
 
        function view() {
-               global $wgOut, $wgScript, $wgRequest;
+               global $wgOut, $wgRequest;
 
                if( $wgRequest->isPathInfoBad() ) {
                        # Internet Explorer will ignore the Content-Type header if it
@@ -158,7 +158,7 @@ class RawPage {
        }
 
        function getRawText() {
-               global $wgUser, $wgOut, $wgRequest;
+               global $wgUser, $wgOut;
                if( $this->mGen ) {
                        $sk = $wgUser->getSkin();
                        if( !StubObject::isRealObject( $wgOut ) )
index 001f67f..a50d3f9 100644 (file)
@@ -372,7 +372,7 @@ class Skin extends Linker {
                global $wgUseAjax, $wgAjaxWatch;
                global $wgVersion, $wgEnableAPI, $wgEnableWriteAPI;
                global $wgRestrictionTypes;
-               global $wgMWSuggestTemplate, $wgDBname, $wgEnableMWSuggest;
+               global $wgDBname, $wgEnableMWSuggest;
                global $wgSitename;
 
                $ns = $wgTitle->getNamespace();
@@ -597,8 +597,8 @@ CSS;
         * @private
         */
        function setupUserCss( OutputPage $out ) {
-               global $wgRequest, $wgContLang, $wgUser;
-               global $wgAllowUserCss, $wgUseSiteCss, $wgSquidMaxage, $wgStylePath;
+               global $wgRequest, $wgUser;
+               global $wgAllowUserCss, $wgUseSiteCss, $wgSquidMaxage;
 
                wfProfileIn( __METHOD__ );
 
@@ -1088,7 +1088,7 @@ CSS;
        }
 
        function getUndeleteLink() {
-               global $wgUser, $wgContLang, $wgLang, $wgRequest;
+               global $wgUser, $wgLang, $wgRequest;
 
                $action = $wgRequest->getVal( 'action', 'view' );
 
@@ -1609,7 +1609,7 @@ CSS;
         * Show a drop-down box of special pages
         */
        function specialPagesList() {
-               global $wgUser, $wgContLang, $wgServer, $wgRedirectScript;
+               global $wgContLang, $wgServer, $wgRedirectScript;
                $pages = array_merge( SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages() );
                foreach ( $pages as $name => $page ) {
                        $pages[$name] = $page->getDescription();
index b1ea8f6..e14674b 100644 (file)
@@ -875,7 +875,7 @@ class SkinTemplate extends Skin {
         */
        function buildNavUrls() {
                global $wgUseTrackbacks, $wgOut, $wgUser, $wgRequest;
-               global $wgEnableUploads, $wgUploadNavigationUrl;
+               global $wgUploadNavigationUrl;
 
                wfProfileIn( __METHOD__ );
 
index 6db66ba..32022ed 100644 (file)
@@ -91,7 +91,7 @@ function wfGetType( $filename, $safe = true ) {
         */
        if ( $safe ) {
                global $wgFileBlacklist, $wgCheckFileExtensions, $wgStrictFileExtensions, 
-                       $wgFileExtensions, $wgVerifyMimeType, $wgMimeTypeBlacklist, $wgRequest;
+                       $wgFileExtensions, $wgVerifyMimeType, $wgMimeTypeBlacklist;
                list( $partName, $extList ) = UploadBase::splitExtensions( $filename );
                if ( UploadBase::checkFileExtensionList( $extList, $wgFileBlacklist ) ) {
                        return 'unknown/unknown';
index 9d2f4c9..be1ec8f 100644 (file)
@@ -789,7 +789,7 @@ class Title {
         * @return \type{\string} the URL
         */
        public function getFullURL( $query = '', $variant = false ) {
-               global $wgContLang, $wgServer, $wgRequest;
+               global $wgServer, $wgRequest;
 
                if ( is_array( $query ) ) {
                        $query = wfArrayToCGI( $query );
@@ -3230,7 +3230,7 @@ class Title {
         *  Ignored if the user doesn't have the suppressredirect right
         */
        private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
-               global $wgUseSquid, $wgUser, $wgContLang;
+               global $wgUser, $wgContLang;
 
                $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
                if ( $reason ) {
@@ -4042,8 +4042,7 @@ class Title {
         * @return Boolean
         */
        public function canUseNoindex() {
-               global $wgArticleRobotPolicies, $wgContentNamespaces,
-                      $wgExemptFromUserRobotsControl;
+               global $wgContentNamespaces,  $wgExemptFromUserRobotsControl;
 
                $bannedNamespaces = is_null( $wgExemptFromUserRobotsControl )
                        ? $wgContentNamespaces
index 22f9f6f..558aabb 100644 (file)
@@ -859,7 +859,7 @@ class User {
         * @return \bool True if the user is logged in, false otherwise.
         */
        private function loadFromSession() {
-               global $wgMemc, $wgCookiePrefix, $wgExternalAuthType, $wgAutocreatePolicy;
+               global $wgCookiePrefix, $wgExternalAuthType, $wgAutocreatePolicy;
 
                $result = null;
                wfRunHooks( 'UserLoadFromSession', array( $this, &$result ) );
index b351601..1447045 100644 (file)
@@ -359,7 +359,6 @@ class EmailNotification {
                # we use $wgPasswordSender as sender's address
                global $wgEnotifWatchlist;
                global $wgEnotifMinorEdits, $wgEnotifUserTalk;
-               global $wgEnotifImpersonal;
 
                wfProfileIn( __METHOD__ );
 
index 0d6b815..6ecfeda 100644 (file)
@@ -105,7 +105,7 @@ class UserRightsProxy {
         * @return DatabaseBase or null if invalid selection
         */
        public static function getDB( $database ) {
-               global $wgLocalDatabases, $wgDBname;
+               global $wgDBname;
                if( self::validDatabase( $database ) ) {
                        if( $database == $wgDBname ) {
                                // Hmm... this shouldn't happen though. :)
index 878e165..0fe12f8 100644 (file)
@@ -12,7 +12,7 @@ class WikiMap {
         * @return WikiReference object or null if the wiki was not found
         */
        public static function getWiki( $wikiID ) {
-               global $wgConf, $IP;
+               global $wgConf;
 
                $wgConf->loadFullData();
 
index 19a6b39..6c065b8 100644 (file)
@@ -554,7 +554,6 @@ abstract class DatabaseBase {
         * @param $tempIgnore Boolean
         */
        function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
-               global $wgCommandLineMode;
                # Ignore errors during error handling to avoid infinite recursion
                $ignore = $this->ignoreErrors( true );
                ++$this->mErrorCount;
index f07a2a5..3866b1e 100644 (file)
@@ -992,8 +992,6 @@ class DatabaseOracle extends DatabaseBase {
        }
 
        function setup_database() {
-               global $wgVersion, $wgDBmwschema, $wgDBts2schema, $wgDBport, $wgDBuser;
-
                $res = $this->sourceFile( "../maintenance/ora/tables.sql" );
                if ($res === true) {
                        print " done.</li>\n";
index dcc5316..c4f31e8 100644 (file)
@@ -403,7 +403,6 @@ class LoadBalancer {
         * @param $wiki String: wiki ID
         */
        public function &getConnection( $i, $groups = array(), $wiki = false ) {
-               global $wgDBtype;
                wfProfileIn( __METHOD__ );
 
                if ( $i == DB_LAST ) {
index 323a631..6b85dd6 100644 (file)
@@ -258,7 +258,6 @@ abstract class FileRepo {
         * Get the name of an image from its title object
         */
        function getNameFromTitle( $title ) {
-               global $wgCapitalLinks;
                if ( $this->initialCapital != MWNamespace::isCapitalized( NS_FILE ) ) {
                        global $wgContLang;
                        $name = $title->getUserCaseDBKey();
index ee514bb..2474453 100644 (file)
@@ -275,8 +275,6 @@ abstract class CoreInstaller extends Installer {
         * @return Status
         */
        public function installExtensions() {
-               global $wgHooks, $wgAutoloadClasses;
-               
                $exts = $this->getVar( '_Extensions' );
                $path = $this->getVar( 'IP' ) . '/extensions';
                
index f977699..fe7f5c2 100644 (file)
@@ -36,7 +36,6 @@ class SqliteInstaller extends DatabaseInstaller {
        }
 
        public function submitConnectForm() {
-               global $wgSQLiteDataDir;
                $this->setVarsFromRequest( array( 'wgSQLiteDataDir', 'wgDBname' ) );
 
                $dir = realpath( $this->getVar( 'wgSQLiteDataDir' ) );
index ca0087b..0645e8a 100644 (file)
@@ -3496,8 +3496,6 @@ class Parser {
         * @param $frame PPFrame
         */
        function extensionSubstitution( $params, $frame ) {
-               global $wgRawHtml, $wgContLang;
-
                $name = $frame->expand( $params['name'] );
                $attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] );
                $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
index f7e2e17..a62104f 100644 (file)
@@ -857,7 +857,7 @@ class SearchHighlighter {
         * @return String
         */
        public function highlightText( $text, $terms, $contextlines, $contextchars ) {
-               global $wgLang, $wgContLang;
+               global $wgContLang;
                global $wgSearchHighlightBoundaries;
                $fname = __METHOD__;
 
@@ -1131,8 +1131,6 @@ class SearchHighlighter {
         * @return String
         */
        function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
-               global $wgContLang;
-
                if ( $start != 0 )
                        $start = $this->position( $text, $start, 1 );
                if ( $end >= strlen( $text ) )
@@ -1283,7 +1281,7 @@ class SearchHighlighter {
      * @return String
      */
     public function highlightSimple( $text, $terms, $contextlines, $contextchars ) {
-        global $wgLang, $wgContLang;
+        global $wgContLang;
         $fname = __METHOD__;
 
         $lines = explode( "\n", $text );
index 80db368..ded22da 100644 (file)
@@ -126,7 +126,7 @@ class ActiveUsersPager extends UsersPager {
        }
 
        function getPageHeader() {
-               global $wgScript, $wgRequest;
+               global $wgScript;
 
                $self = $this->getTitle();
                $limit = $this->mLimit ? Xml::hidden( 'limit', $this->mLimit ) : '';
index 4c468c7..d960791 100644 (file)
@@ -30,7 +30,7 @@ class SpecialContributions extends SpecialPage {
        }
 
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgLang, $wgRequest;
+               global $wgUser, $wgOut, $wgRequest;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -380,7 +380,7 @@ class SpecialContributions extends SpecialPage {
         * @param $type String
         */
        protected function feed( $type ) {
-               global $wgRequest, $wgFeed, $wgFeedClasses, $wgFeedLimit;
+               global $wgFeed, $wgFeedClasses, $wgFeedLimit;
 
                if( !$wgFeed ) {
                        global $wgOut;
index 2bf450f..7d17fb1 100644 (file)
@@ -276,7 +276,7 @@ class DeletedContributionsPage extends SpecialPage {
                        return;
                }
 
-               global $wgOut, $wgLang, $wgRequest;
+               global $wgOut, $wgRequest;
 
                $wgOut->setPageTitle( wfMsgExt( 'deletedcontributions-title', array( 'parsemag' ) ) );
 
@@ -463,7 +463,7 @@ class DeletedContributionsPage extends SpecialPage {
         * @param $options Array: the options to be included.
         */
        function getForm( $options ) {
-               global $wgScript, $wgRequest;
+               global $wgScript;
 
                $options['title'] = SpecialPage::getTitleFor( 'DeletedContributions' )->getPrefixedText();
                if ( !isset( $options['target'] ) ) {
index ff524ef..0e4a55d 100644 (file)
@@ -217,7 +217,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * @return Mixed: True on success, String on error
         */
        public static function submit( $data ) {
-               global $wgUser, $wgUserEmailUseReplyTo, $wgSiteName;
+               global $wgUser, $wgUserEmailUseReplyTo;
 
                $target = self::getTarget( $data['Target'] );
                if( !$target instanceof User ){
index bc470d0..be9fecb 100644 (file)
@@ -194,8 +194,6 @@ class SpecialExport extends SpecialPage {
         *                      not returning full history)
         */
        private function doExport( $page, $history, $list_authors ) {
-               global $wgExportMaxHistory;
-
                $pageSet = array(); // Inverted index of all pages to look up
 
                // Split up and normalize input
@@ -347,7 +345,7 @@ class SpecialExport extends SpecialPage {
         * Validate link depth setting, if available.
         */
        private function validateLinkDepth( $depth ) {
-               global $wgExportMaxLinkDepth, $wgExportMaxLinkDepthLimit;
+               global $wgExportMaxLinkDepth;
                if( $depth < 0 ) {
                        return 0;
                }
index d562fa4..fa976f6 100644 (file)
@@ -132,7 +132,7 @@ class SpecialImport extends SpecialPage {
        }
 
        private function showForm() {
-               global $wgUser, $wgOut, $wgRequest, $wgImportSources, $wgExportMaxLinkDepth;
+               global $wgUser, $wgOut, $wgImportSources, $wgExportMaxLinkDepth;
                if( !$wgUser->isAllowed( 'import' ) && !$wgUser->isAllowed( 'importupload' ) )
                        return $wgOut->permissionRequired( 'import' );
 
index bed2ddb..7e89d34 100644 (file)
@@ -362,7 +362,7 @@ class IPUnblockForm extends SpecialPage {
        }
 
        function searchForm() {
-               global $wgScript, $wgRequest, $wgLang;
+               global $wgScript, $wgLang;
 
                $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
                $nondefaults = array();
index 5ffe892..ef0e2c2 100644 (file)
@@ -31,7 +31,7 @@
 function wfSpecialLinkSearch( $par ) {
 
        list( $limit, $offset ) = wfCheckLimits();
-       global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, $wgLang;
+       global $wgOut, $wgUrlProtocols, $wgMiserMode, $wgLang;
        $target = $GLOBALS['wgRequest']->getVal( 'target', $par );
        $namespace = $GLOBALS['wgRequest']->getIntorNull( 'namespace', null );
 
index 0bf1884..8dc1a9d 100644 (file)
@@ -176,7 +176,7 @@ class UsersPager extends AlphabeticPager {
        }
 
        function getPageHeader( ) {
-               global $wgScript, $wgRequest;
+               global $wgScript;
                $self = $this->getTitle();
 
                # Form tag
@@ -270,7 +270,7 @@ class UsersPager extends AlphabeticPager {
  * $par string (optional) A group to list users from
  */
 function wfSpecialListusers( $par = null ) {
-       global $wgRequest, $wgOut;
+       global $wgOut;
 
        $up = new UsersPager($par);
 
index b5817f8..75935ec 100644 (file)
@@ -157,7 +157,7 @@ class SpecialMergeHistory extends SpecialPage {
        }
 
        private function showHistory() {
-               global $wgLang, $wgUser, $wgOut;
+               global $wgUser, $wgOut;
 
                $this->sk = $wgUser->getSkin();
 
index 030f744..51c84de 100644 (file)
@@ -347,7 +347,7 @@ class MovePageForm {
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgRequest, $wgMaximumMovedPages, $wgLang;
+               global $wgOut, $wgUser, $wgMaximumMovedPages, $wgLang;
                global $wgFixDoubleRedirects;
 
                if ( $wgUser->pingLimiter( 'move' ) ) {
index 7f755a8..125a8b2 100644 (file)
@@ -105,7 +105,7 @@ class SpecialNewpages extends IncludableSpecialPage {
         * @return String
         */
        public function execute( $par ) {
-               global $wgLang, $wgOut;
+               global $wgOut;
 
                $this->setHeaders();
                $this->outputHeader();
index 2952dc2..9330ac3 100644 (file)
@@ -69,7 +69,7 @@ class ProtectedTitlesForm {
         * Callback function to output a restriction
         */
        function formatRow( $row ) {
-               global $wgUser, $wgLang, $wgContLang;
+               global $wgUser, $wgLang;
 
                wfProfileIn( __METHOD__ );
 
index 3972af3..c0062c6 100644 (file)
@@ -69,7 +69,7 @@ class SpecialRevisionMove extends UnlistedSpecialPage {
         * Mostly initializes variables and calls either showForm() or submit()
         */
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgSkin;
+               global $wgUser, $wgOut;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -234,8 +234,6 @@ class SpecialRevisionMove extends UnlistedSpecialPage {
         * This function actually move the revision. NEVER call this function, call submit()
         */
        protected function moveRevisions() {
-               global $wgOut;
-
                $oldArticle = new Article( $this->mOldTitle );
                $newArticle = new Article( $this->mNewTitle );
 
index a7f09b6..2dba597 100644 (file)
@@ -443,7 +443,7 @@ class SpecialSearch {
         * @param $terms Array: terms to highlight
         */
        protected function showHit( $result, $terms ) {
-               global $wgContLang, $wgLang, $wgUser;
+               global $wgLang, $wgUser;
                wfProfileIn( __METHOD__ );
 
                if( $result->isBrokenTitle() ) {
@@ -667,7 +667,6 @@ class SpecialSearch {
         */
        protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions) {
                wfProfileIn( __METHOD__ );
-               global $wgContLang, $wgLang;
 
                if( $result->isBrokenTitle() ) {
                        wfProfileOut( __METHOD__ );
@@ -745,8 +744,6 @@ class SpecialSearch {
         * @return String: HTML form
         */
        protected function powerSearchBox( $term ) {
-               global $wgScript, $wgContLang;
-               
                // Groups namespaces into rows according to subject
                $rows = array();
                foreach( SearchEngine::searchableNamespaces() as $namespace => $name ) {
@@ -894,7 +891,7 @@ class SpecialSearch {
        }
 
        protected function formHeader( $term, $resultsShown, $totalNum ) {
-               global $wgContLang, $wgLang;
+               global $wgLang;
                
                $out = Xml::openElement('div', array( 'class' =>  'mw-search-formheader' ) );
                
index d3c1a76..7438f2d 100644 (file)
@@ -38,7 +38,7 @@ class SpecialStatistics extends SpecialPage {
        }
        
        public function execute( $par ) {
-               global $wgOut, $wgRequest, $wgMessageCache, $wgMemc;
+               global $wgOut, $wgRequest, $wgMemc;
                global $wgDisableCounters, $wgMiserMode;
                
                $this->setHeaders();
@@ -123,7 +123,6 @@ class SpecialStatistics extends SpecialPage {
         * @return string table row in HTML format
         */
        private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) {
-               global $wgStylePath;
                if( $descMsg ) {
                        $descriptionText = wfMsgExt( $descMsg, array( 'parseinline' ), $descMsgParam );
                        if ( !wfEmptyMsg( $descMsg, $descriptionText ) ) {
index ba7048b..1124374 100644 (file)
@@ -721,7 +721,7 @@ class UndeleteForm extends SpecialPage {
 
        // Generic list of deleted pages
        private function showList( $result ) {
-               global $wgLang, $wgContLang, $wgUser, $wgOut;
+               global $wgLang, $wgUser, $wgOut;
 
                if( $result->numRows() == 0 ) {
                        $wgOut->addWikiMsg( 'undelete-no-results' );
@@ -1015,7 +1015,7 @@ class UndeleteForm extends SpecialPage {
        }
 
        private function showHistory( ) {
-               global $wgLang, $wgUser, $wgOut;
+               global $wgUser, $wgOut;
 
                $sk = $wgUser->getSkin();
                if( $this->mAllowed ) {
index 65cbfaa..dd63145 100644 (file)
@@ -135,7 +135,7 @@ class SpecialUpload extends SpecialPage {
         * Special page entry point
         */
        public function execute( $par ) {
-               global $wgUser, $wgOut, $wgRequest;
+               global $wgUser, $wgOut;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -630,7 +630,7 @@ class SpecialUpload extends SpecialPage {
         * @return String: empty string if there is no warning or an HTML fragment
         */
        public static function getExistsWarning( $exists ) {
-               global $wgUser, $wgContLang;
+               global $wgUser;
 
                if ( !$exists ) {
                        return '';
@@ -878,7 +878,6 @@ class UploadForm extends HTMLForm {
                global $wgLang, $wgCheckFileExtensions, $wgStrictFileExtensions,
                $wgFileExtensions, $wgFileBlacklist;
 
-               $allowedExtensions = '';
                if( $wgCheckFileExtensions ) {
                        if( $wgStrictFileExtensions ) {
                                # Everything not permitted is banned
index 3191934..818a94e 100644 (file)
@@ -624,7 +624,7 @@ class LoginForm {
        }
 
        function processLogin() {
-               global $wgUser, $wgAuth;
+               global $wgUser;
 
                switch ( $this->authenticateUserData() ) {
                        case self::SUCCESS:
@@ -803,7 +803,7 @@ class LoginForm {
         * @private
         */
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
-               global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry;
+               global $wgServer, $wgScript, $wgNewPasswordExpiry;
 
                if ( $u->getEmail() == '' ) {
                        return new WikiError( wfMsg( 'noemail', $u->getName() ) );
@@ -838,7 +838,7 @@ class LoginForm {
         * @private
         */
        function successfulLogin() {
-               global $wgUser, $wgOut;
+               global $wgOut;
 
                # Run any hooks; display injected HTML if any, else redirect
                $injected_html = '';
@@ -862,8 +862,7 @@ class LoginForm {
         * @private
         */
        function successfulCreation() {
-               global $wgUser, $wgOut;
-
+               global $wgUser;
                # Run any hooks; display injected HTML
                $injected_html = '';
                wfRunHooks('UserLoginComplete', array(&$wgUser, &$injected_html));
index 914b004..853e784 100644 (file)
@@ -159,7 +159,7 @@ class UserrightsPage extends SpecialPage {
         * @return null
         */
        function saveUserGroups( $username, $reason = '' ) {
-               global $wgRequest, $wgUser, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
+               global $wgRequest, $wgOut;
 
                $status = $this->fetchUser( $username );
                if( !$status->isOK() ) {
index 88f5474..05f7a59 100644 (file)
@@ -72,8 +72,6 @@ class SpecialVersion extends SpecialPage {
         * @return wiki text showing the license information
         */
        static function MediaWikiCredits() {
-               global $wgContLang;
-
                $ret = Xml::element( 'h2', array( 'id' => 'mw-version-license' ), wfMsg( 'version-license' ) );
 
                // This text is always left-to-right.
index 33f2644..d6628dc 100644 (file)
@@ -36,7 +36,7 @@ function wfSpecialWatchlist( $par ) {
                $wgUser->saveSettings();
        }
        
-       global $wgServer, $wgScriptPath, $wgFeedClasses;
+       global $wgFeedClasses;
        $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
                                                'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken );
        $feedTemplate = wfScript('api').'?';
index 37eee79..0414ef8 100644 (file)
@@ -89,7 +89,7 @@ class WithoutInterwikiPage extends PageQueryPage {
 }
 
 function wfSpecialWithoutinterwiki() {
-       global $wgRequest, $wgContLang;
+       global $wgRequest;
        list( $limit, $offset ) = wfCheckLimits();
        // Only searching the mainspace anyway
        $prefix = Title::capitalize( $wgRequest->getVal( 'prefix' ), NS_MAIN );
index 8d6de71..6b5aac5 100644 (file)
@@ -163,7 +163,6 @@ class UploadFromUrl extends UploadBase {
                }
 
                if ( $status->isGood() ) {
-                       global $wgLocalFileRepo;
                        $file = $this->getLocalFile();
 
                        $wgUser->leaveUserMessage( wfMsg( 'successfulupload' ),