Clean up unused globals!
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 4 Dec 2005 18:27:59 +0000 (18:27 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 4 Dec 2005 18:27:59 +0000 (18:27 +0000)
62 files changed:
includes/Article.php
includes/CacheManager.php
includes/ChangesList.php
includes/DatabaseOracle.php
includes/DatabasePostgreSQL.php
includes/DateFormatter.php
includes/EditPage.php
includes/ExternalEdit.php
includes/GlobalFunctions.php
includes/HttpFunctions.php
includes/Image.php
includes/ImageGallery.php
includes/ImagePage.php
includes/Linker.php
includes/LinksUpdate.php
includes/LoadBalancer.php
includes/MessageCache.php
includes/Metadata.php
includes/OutputPage.php
includes/PageHistory.php
includes/Parser.php
includes/Profiling.php
includes/QueryPage.php
includes/SearchUpdate.php
includes/SiteStatsUpdate.php
includes/Skin.php
includes/SkinTemplate.php
includes/SpecialAllmessages.php
includes/SpecialAllpages.php
includes/SpecialBlockip.php
includes/SpecialBooksources.php
includes/SpecialCategories.php
includes/SpecialDisambiguations.php
includes/SpecialEmailuser.php
includes/SpecialExport.php
includes/SpecialImagelist.php
includes/SpecialImport.php
includes/SpecialIpblocklist.php
includes/SpecialListusers.php
includes/SpecialLockdb.php
includes/SpecialMaintenance.php
includes/SpecialMovepage.php
includes/SpecialRandompage.php
includes/SpecialRecentchanges.php
includes/SpecialRecentchangeslinked.php
includes/SpecialSpecialpages.php
includes/SpecialStatistics.php
includes/SpecialUndelete.php
includes/SpecialUnlockdb.php
includes/SpecialUnusedcategories.php
includes/SpecialUpload.php
includes/SpecialUploadMogile.php
includes/SpecialUserlogin.php
includes/SpecialUserlogout.php
includes/SpecialValidate.php
includes/SpecialWatchlist.php
includes/StreamFile.php
includes/Title.php
includes/User.php
includes/UserMailer.php
includes/UserTalkUpdate.php
includes/WebRequest.php

index 5b6c6b9..5d86ccf 100644 (file)
@@ -676,9 +676,9 @@ class Article {
         * the given title.
        */
        function view() {
-               global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgLang, $wgContLang;
-               global $wgLinkCache, $IP, $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol;
-               global $wgEnotif, $wgParser, $wgParserCache, $wgUseTrackbacks;
+               global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgContLang;
+               global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
+               global $wgParserCache, $wgUseTrackbacks;
                $sk = $wgUser->getSkin();
 
                $fname = 'Article::view';
@@ -1077,8 +1077,7 @@ class Article {
         * @private
         */
        function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC=false, $comment=false ) {
-               global $wgOut, $wgUser;
-               global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer;
+               global $wgOut, $wgUser, $wgUseSquid;
 
                $fname = 'Article::insertNewArticle';
                wfProfileIn( $fname );
@@ -1263,9 +1262,8 @@ class Article {
         * first set $wgUser, and clean up $wgDeferredUpdates after each edit.
         */
        function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) {
-               global $wgOut, $wgUser;
-               global $wgDBtransactions, $wgMwRedir;
-               global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList, $wgUseFileCache;
+               global $wgOut, $wgUser, $wgDBtransactions, $wgMwRedir, $wgUseSquid;
+               global $wgPostCommitUpdateList, $wgUseFileCache;
 
                $fname = 'Article::updateArticle';
                wfProfileIn( $fname );
@@ -1747,7 +1745,7 @@ class Article {
         * UI entry point for page deletion
         */
        function delete() {
-               global $wgUser, $wgOut, $wgMessageCache, $wgRequest;
+               global $wgUser, $wgOut, $wgRequest;
                $fname = 'Article::delete';
                $confirm = $wgRequest->wasPosted() &&
                        $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
@@ -1935,9 +1933,8 @@ class Article {
         * Returns success
         */
        function doDeleteArticle( $reason ) {
-               global $wgUser;
-               global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer, $wgPostCommitUpdateList;
-               global $wgUseTrackbacks;
+               global $wgUser, $wgUseSquid, $wgDeferredUpdateList;
+               global $wgPostCommitUpdateList, $wgUseTrackbacks;
 
                $fname = 'Article::doDeleteArticle';
                wfDebug( $fname."\n" );
@@ -2180,8 +2177,7 @@ class Article {
         * @param string $text
         */
        function editUpdates( $text, $summary, $minoredit, $timestamp_of_pagechange) {
-               global $wgDeferredUpdateList, $wgDBname, $wgMemc;
-               global $wgMessageCache, $wgUser, $wgUseEnotif;
+               global $wgDeferredUpdateList, $wgMessageCache, $wgUser, $wgUseEnotif;
 
                if ( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
                        wfSeedRandom();
index 66121de..9f8abc1 100644 (file)
@@ -32,7 +32,7 @@ class CacheManager {
        }
        
        function fileCacheName() {
-               global $wgFileCacheDirectory, $wgContLang;
+               global $wgFileCacheDirectory;
                if( !$this->mFileCache ) {
                        $key = $this->mTitle->getPrefixedDbkey();
                        $hash = md5( $key );
index ecf261f..9e5e4b1 100644 (file)
@@ -302,8 +302,8 @@ class OldChangesList extends ChangesList {
         * Format a line using the old system (aka without any javascript).
         */
        function recentChangesLine( &$rc, $watched = false ) {
-               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol,
-                       $wgOnlySysopsCanPatrol, $wgSysopUserBans;
+               global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
+               global $wgOnlySysopsCanPatrol, $wgSysopUserBans;
 
                $fname = 'ChangesList::recentChangesLineOld';
                wfProfileIn( $fname );
@@ -368,8 +368,8 @@ class EnhancedChangesList extends ChangesList {
         * Format a line for enhanced recentchange (aka with javascript and block of lines).
         */
        function recentChangesLine( &$baseRC, $watched = false ) {
-               global $wgTitle, $wgLang, $wgContLang, $wgUser,
-                       $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans;
+               global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
+               global $wgOnlySysopsCanPatrol, $wgSysopUserBans;
 
                # Create a specialised object
                $rc = RCCacheEntry::newFromParent( $baseRC ) ;
index 5aa0aa5..c5cb142 100644 (file)
@@ -279,14 +279,14 @@ class DatabaseOracle extends Database {
                return true;
        }
 
-       function startTimer( $timeout )
-       {
-               global $IP;
+       /** @todo FIXME */
+       function startTimer( $timeout ) {
                wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
                /*$tid = mysql_thread_id( $this->mConn );
                exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
        }
 
+       /** */
        function tableName($name, $forddl = false) {
                # First run any transformations from the parent object
                $name = parent::tableName( $name );
index 7d32166..bb88dcb 100644 (file)
@@ -227,9 +227,8 @@ class DatabasePgsql extends Database {
                return $retVal;
        }
        
-       function startTimer( $timeout )
-       {
-               global $IP;
+       /** @todo FIXME */
+       function startTimer( $timeout ) {
                wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
                /*$tid = mysql_thread_id( $this->mConn );
                exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
index 7e1e4b6..0b92de1 100755 (executable)
@@ -37,7 +37,7 @@ class DateFormatter
         * @todo document
         */
        function DateFormatter() {
-               global $wgContLang, $wgInputEncoding;
+               global $wgContLang;
                
                $this->monthNames = $this->getMonthRegex();
                for ( $i=1; $i<=12; $i++ ) {
index 4e39380..8c73af6 100644 (file)
@@ -1037,7 +1037,7 @@ END
         * @todo document
         */
        function getPreviewText() {
-               global $wgOut, $wgUser, $wgTitle, $wgParser, $wgAllowDiffPreview, $wgEnableDiffPreviewPreference;
+               global $wgOut, $wgUser, $wgTitle, $wgParser;
 
                $fname = 'EditPage::getPreviewText';
                wfProfileIn( $fname );
@@ -1243,7 +1243,7 @@ END
         * The necessary JavaScript code can be found in style/wikibits.js.
         */
        function getEditToolbar() {
-               global $wgStylePath, $wgLang, $wgMimeType, $wgJsMimeType;
+               global $wgStylePath, $wgLang, $wgJsMimeType;
 
                /**
                 * toolarray an array of arrays which each include the filename of
index e3effe6..74d2c9d 100644 (file)
@@ -31,8 +31,7 @@ class ExternalEdit {
        }
        
        function edit() {
-               global $wgUser, $wgOut, $wgScript, $wgScriptPath, $wgServer,
-                      $wgLang;
+               global $wgOut, $wgScript, $wgScriptPath, $wgServer, $wgLang;
                $wgOut->disable();
                $name=$this->mTitle->getText();
                $pos=strrpos($name,".")+1;
index 57bd132..200f4bd 100644 (file)
@@ -212,7 +212,7 @@ function wfLogDBError( $text ) {
  */
 function logProfilingData() {
        global $wgRequestTime, $wgDebugLogFile, $wgDebugRawPage, $wgRequest;
-       global $wgProfiling, $wgProfileStack, $wgProfileLimit, $wgUser;
+       global $wgProfiling, $wgUser;
        $now = wfTime();
 
        list( $usec, $sec ) = explode( ' ', $wgRequestTime );
@@ -389,9 +389,7 @@ function wfMsgReal( $key, $args, $useDB, $forContent=false, $transform = true )
  * @access private
  */
 function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) {
-       global $wgParser, $wgMsgParserOptions;
-       global $wgContLang, $wgLanguageCode;
-       global $wgMessageCache, $wgLang;
+       global $wgParser, $wgMsgParserOptions, $wgContLang, $wgMessageCache, $wgLang;
 
        if ( is_object( $wgMessageCache ) )
                $transstat = $wgMessageCache->getTransform();
index c0df2e9..87e2a86 100644 (file)
@@ -9,8 +9,7 @@
  * if $timeout is 'default', $wgHTTPTimeout is used
  */
 function wfGetHTTP( $url, $timeout = 'default' ) {
-       global $wgServer, $wgHTTPTimeout, $wgHTTPProxy;
-       
+       global $wgHTTPTimeout, $wgHTTPProxy;
 
        # Use curl if available
        if ( function_exists( 'curl_init' ) ) {
index 372f86e..cd389da 100644 (file)
@@ -1269,7 +1269,6 @@ class Image
        */
        function getFullPath( $fromSharedRepository = false ) {
                global $wgUploadDirectory, $wgSharedUploadDirectory;
-               global $wgHashedUploadDirectory, $wgHashedSharedUploadDirectory;
                
                $dir      = $fromSharedRepository ? $wgSharedUploadDirectory :
                                                    $wgUploadDirectory;
@@ -1297,8 +1296,7 @@ class Image
         * Record an image upload in the upload log and the image table
         */
        function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', $watch = false ) {
-               global $wgUser, $wgLang, $wgTitle, $wgDeferredUpdateList;
-               global $wgUseCopyrightUpload, $wgUseSquid, $wgPostCommitUpdateList;
+               global $wgUser, $wgUseCopyrightUpload, $wgUseSquid, $wgPostCommitUpdateList;
 
                $fname = 'Image::recordUpload';
                $dbw =& wfGetDB( DB_MASTER );
index 28f076a..c33a3f2 100644 (file)
@@ -88,7 +88,7 @@ class ImageGallery
         *
         */
        function toHTML() {
-               global $wgLang, $wgContLang, $wgUser;
+               global $wgLang, $wgUser;
 
                $sk = $wgUser->getSkin();
 
index 7e64769..5d4274d 100644 (file)
@@ -27,7 +27,7 @@ class ImagePage extends Article {
        }
 
        function view() {
-               global $wgUseExternalEditor, $wgOut, $wgShowEXIF;
+               global $wgOut, $wgShowEXIF;
 
                $this->img = new Image( $this->mTitle );
 
@@ -160,11 +160,9 @@ class ImagePage extends Article {
                return Article::getContent( $noredir );
        }
 
-       function openShowImage()
-       {
-               global $wgOut, $wgUser, $wgImageLimits, $wgRequest,
-                      $wgUseImageResize, $wgRepositoryBaseUrl,
-                      $wgUseExternalEditor, $wgServer, $wgFetchCommonsDescriptions;
+       function openShowImage() {
+               global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize;
+
                $full_url  = $this->img->getURL();
                $anchoropen = '';
                $anchorclose = '';
@@ -470,10 +468,10 @@ END
                return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
        }
 
-       function doDelete()
-       {
-               global $wgOut, $wgUser, $wgContLang, $wgRequest;
-               global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList;
+       function doDelete()     {
+               global $wgOut, $wgUser, $wgRequest, $wgUseSquid, $wgInternalServer;
+               global $wgPostCommitUpdateList;
+               
                $fname = 'ImagePage::doDelete';
 
                $reason = $wgRequest->getVal( 'wpReason' );
@@ -590,10 +588,8 @@ END
                }
        }
 
-       function revert()
-       {
-               global $wgOut, $wgRequest, $wgUser;
-               global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList;
+       function revert() {
+               global $wgOut, $wgRequest, $wgUser, $wgUseSquid, $wgInternalServer;
 
                $oldimage = $wgRequest->getText( 'oldimage' );
                if ( strlen( $oldimage ) < 16 ) {
@@ -688,7 +684,7 @@ class ImageHistoryList {
        }
 
        function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
-               global $wgUser, $wgLang, $wgContLang, $wgTitle;
+               global $wgUser, $wgLang, $wgTitle;
 
                $datetime = $wgLang->timeanddate( $timestamp, true );
                $del = wfMsg( 'deleteimg' );
index 798a262..f7c1959 100644 (file)
@@ -230,7 +230,6 @@ class Linker {
         * @return the a-element
         */
        function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '' ) {
-               global $wgTitle;
 
                $fname = 'Linker::makeKnownLinkObj';
                wfProfileIn( $fname );
@@ -800,7 +799,6 @@ class Linker {
 
        /** @todo document */
        function editSectionLinkForOther( $title, $section ) {
-               global $wgRequest;
                global $wgContLang;
 
                $title = Title::newFromText($title);
index 30b1b50..2e02aec 100644 (file)
@@ -33,8 +33,7 @@ class LinksUpdate {
         */
        
        function doUpdate() {
-               global $wgUseDumbLinkUpdate, $wgLinkCache, $wgDBtransactions;
-               global $wgUseCategoryMagic;
+               global $wgUseDumbLinkUpdate, $wgLinkCache, $wgUseCategoryMagic;
 
                if ( $wgUseDumbLinkUpdate ) {
                        $this->doDumbUpdate();
@@ -189,7 +188,7 @@ class LinksUpdate {
          * Also useful where link table corruption needs to be repaired, e.g. in refreshLinks.php
         */
        function doDumbUpdate() {
-               global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic;
+               global $wgLinkCache, $wgUseCategoryMagic;
                $fname = 'LinksUpdate::doDumbUpdate';
                wfProfileIn( $fname );
                
index edc1fad..40b4613 100644 (file)
@@ -159,9 +159,8 @@ class LoadBalancer {
         *
         * Side effect: opens connections to databases
         */
-       function getReaderIndex()
-       {
-               global $wgMaxLag, $wgReadOnly, $wgDBClusterTimeout;
+       function getReaderIndex() {
+               global $wgReadOnly, $wgDBClusterTimeout;
 
                $fname = 'LoadBalancer::getReaderIndex';
                wfProfileIn( $fname );
index d13f174..a5c99f6 100755 (executable)
@@ -21,8 +21,7 @@ define( 'MSG_WAIT_TIMEOUT', 10);
  *
  * @package MediaWiki
  */
-class MessageCache
-{
+class MessageCache {
        var $mCache, $mUseCache, $mDisable, $mExpiry;
        var $mMemcKey, $mKeys, $mParserOptions, $mParser;
        var $mExtensionMessages = array();
@@ -30,7 +29,6 @@ class MessageCache
        var $mDeferred = true;
 
        function initialise( &$memCached, $useDB, $expiry, $memcPrefix) {
-               global $wgLocalMessageCache;
                $fname = 'MessageCache::initialise';
                wfProfileIn( $fname );
 
@@ -117,7 +115,7 @@ class MessageCache
         * Returns false for a reportable error, true otherwise
         */
        function load() {
-               global $wgAllMessagesEn, $wgLocalMessageCache;
+               global $wgLocalMessageCache;
 
                if ( $this->mDisable ) {
                        static $shownDisabled = false;
index c60fe43..333ff9a 100644 (file)
@@ -71,7 +71,7 @@ function wfCreativeCommonsRdf($article) {
  * @private
  */
 function rdfSetup() {
-       global $wgOut, $wgRdfMimeType, $_SERVER;
+       global $wgOut, $_SERVER;
 
        $rdftype = wfNegotiateType(wfAcceptToPrefs($_SERVER['HTTP_ACCEPT']), wfAcceptToPrefs(RDF_TYPE_PREFS));
 
index a0e77e4..02b75ea 100644 (file)
@@ -93,7 +93,7 @@ class OutputPage {
         * returns true iff cache-ok headers was sent.
         */
        function checkLastModified ( $timestamp ) {
-               global $wgLang, $wgCachePages, $wgUser;
+               global $wgCachePages, $wgUser;
                if ( !$timestamp || $timestamp == '19700101000000' ) {
                        wfDebug( "CACHE DISABLED, NO TIMESTAMP\n" );
                        return;
@@ -263,7 +263,7 @@ class OutputPage {
        }
 
        function addWikiTextTitle($text, &$title, $linestart) {
-               global $wgParser, $wgUseTidy;
+               global $wgParser;
                $parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions,
                        $linestart, true, $this->mRevisionId );
                $this->mLanguageLinks += $parserOutput->getLanguageLinks();
@@ -279,7 +279,7 @@ class OutputPage {
         * Saves the text into the parser cache if possible
         */
        function addPrimaryWikiText( $text, $cacheArticle ) {
-               global $wgParser, $wgParserCache, $wgUser, $wgUseTidy;
+               global $wgParser, $wgParserCache, $wgUser;
 
                $parserOutput = $wgParser->parse( $text, $cacheArticle->mTitle,
                        $this->mParserOptions, true, true, $this->mRevisionId );
@@ -420,9 +420,8 @@ class OutputPage {
         * the object, let's actually output it:
         */
        function output() {
-               global $wgUser, $wgLang, $wgDebugComments, $wgCookieExpiration;
-               global $wgInputEncoding, $wgOutputEncoding, $wgContLanguageCode;
-               global $wgDebugRedirects, $wgMimeType, $wgProfiler;
+               global $wgUser, $wgCookieExpiration, $wgOutputEncoding;
+               global $wgContLanguageCode, $wgDebugRedirects, $wgMimeType, $wgProfiler;
 
                if( $this->mDoNothing ){
                        return;
index 56c2737..ac3f666 100644 (file)
@@ -53,8 +53,7 @@ class PageHistory {
         * @returns nothing
         */
        function history() {
-               global $wgUser, $wgOut, $wgLang, $wgShowUpdatedMarker, $wgRequest,
-                       $wgTitle, $wgUseValidation;
+               global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgUseValidation;
 
                /*
                 * Allow client caching.
@@ -232,7 +231,6 @@ class PageHistory {
 
        /** @todo document */
        function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, $latest = false, $firstInList = false ) {
-               global $wgLang, $wgContLang;
 
                if ( 0 == $row->rev_user ) {
                        $contribsPage =& Title::makeTitle( NS_SPECIAL, 'Contributions' );
index 7679655..a02d205 100644 (file)
@@ -2680,7 +2680,7 @@ class Parser
         * @access private
         */
        function formatHeadings( $text, $isMain=true ) {
-               global $wgMaxTocLevel, $wgContLang, $wgLinkHolders, $wgInterwikiLinkHolders;
+               global $wgMaxTocLevel, $wgContLang;
 
                $doNumberHeadings = $this->mOptions->getNumberHeadings();
                $doShowToc = true;
@@ -3514,8 +3514,7 @@ class Parser
         * Parse image options text and use it to make an image
         */
        function makeImage( &$nt, $options ) {
-               global $wgContLang, $wgUseImageResize;
-               global $wgUser, $wgThumbLimits;
+               global $wgContLang, $wgUseImageResize, $wgUser;
 
                $align = '';
 
index 316f264..8bb7945 100755 (executable)
@@ -65,7 +65,7 @@ class Profiler {
                $memory = memory_get_usage();
                $time = $this->getTime();
 
-               global $wgDebugProfiling, $wgDebugFunctionEntry;
+               global $wgDebugFunctionEntry;
 
                if ($wgDebugFunctionEntry && function_exists('wfDebug')) {
                        wfDebug(str_repeat(' ', count($this->mWorkStack) - 1).'Exiting '.$functionname."\n");
index 05de61e..62fd92b 100644 (file)
@@ -257,7 +257,7 @@ class QueryPage {
         * @param $shownavigation show navigation like "next 200"?
         */
        function doQuery( $offset, $limit, $shownavigation=true ) {
-               global $wgUser, $wgOut, $wgLang, $wgRequest, $wgContLang;
+               global $wgUser, $wgOut, $wgContLang;
                
                $sname = $this->getName();
                $fname = get_class($this) . '::doQuery';
index 3396eb9..9601f09 100644 (file)
@@ -29,7 +29,7 @@ class SearchUpdate {
        }
 
        function doUpdate() {
-               global $wgDBminWordLen, $wgContLang, $wgDisableSearchUpdate;
+               global $wgContLang, $wgDisableSearchUpdate;
 
                if( $wgDisableSearchUpdate || !$this->mId ) {
                        return false;
index 1c82d08..1b6d380 100644 (file)
@@ -35,7 +35,6 @@ class SiteStatsUpdate {
        }
 
        function doUpdate() {
-               global $wgDBname;
                $fname = 'SiteStatsUpdate::doUpdate';
                $dbw =& wfGetDB( DB_MASTER );
 
index b457a82..a9aeccd 100644 (file)
@@ -109,8 +109,8 @@ class Skin extends Linker {
        }
 
        function addMetadataLinks( &$out ) {
-               global $wgTitle, $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, $wgRdfMimeType, $action;
-               global $wgRightsPage, $wgRightsUrl, $wgUseTrackbacks;
+               global $wgTitle, $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf;
+               global $wgRightsPage, $wgRightsUrl;
 
                if( $out->isArticleRelated() ) {
                        # note: buggy CC software only reads first "meta" link
@@ -176,7 +176,7 @@ class Skin extends Linker {
        }
 
        function getHeadScripts() {
-               global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs, $wgJsMimeType;
+               global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType;
                $r = "<script type=\"{$wgJsMimeType}\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n";
                if( $wgAllowUserJs && $wgUser->isLoggedIn() ) {
                        $userpage = $wgUser->getUserPage();
@@ -237,7 +237,7 @@ class Skin extends Linker {
         * Return html code that include User stylesheets
         */
        function getUserStyles() {
-               global $wgOut, $wgStylePath, $wgLang;
+               global $wgOut, $wgStylePath;
                $s = "<style type='text/css'>\n";
                $s .= "/*/*/ /*<![CDATA[*/\n"; # <-- Hide the styles from Netscape 4 without hiding them from IE/Mac
                $s .= $this->getUserStylesheet();
@@ -309,7 +309,7 @@ END;
        }
 
        function getBodyOptions() {
-               global $wgUser, $wgTitle, $wgNamespaceBackgrounds, $wgOut, $wgRequest;
+               global $wgUser, $wgTitle, $wgOut, $wgRequest;
 
                extract( $wgRequest->getValues( 'oldid', 'redirect', 'diff' ) );
 
@@ -415,8 +415,8 @@ END;
 
 
        function getCategoryLinks () {
-               global $wgOut, $wgTitle, $wgParser;
-               global $wgUseCategoryMagic, $wgUseCategoryBrowser, $wgContLang;
+               global $wgOut, $wgTitle, $wgUseCategoryMagic, $wgUseCategoryBrowser;
+               global $wgContLang;
 
                if( !$wgUseCategoryMagic ) return '' ;
                if( count( $wgOut->mCategoryLinks ) == 0 ) return '';
index 4acc49b..96fb4b1 100644 (file)
@@ -144,8 +144,8 @@ class SkinTemplate extends Skin {
         */
        function outputPage( &$out ) {
                global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut;
-               global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage;
-               global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
+               global $wgScript, $wgStylePath, $wgContLanguageCode;
+               global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest;
                global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks;
                global $wgMaxCredits, $wgShowCreditsIfMax;
                global $wgPageShowWatchingUsers;
@@ -1117,7 +1117,7 @@ class QuickTemplate {
         * @access private
         */
        function msgWiki( $str ) {
-               global $wgParser, $wgTitle, $wgOut, $wgUseTidy;
+               global $wgParser, $wgTitle, $wgOut;
 
                $text = $this->translator->translate( $str );
                $parserOutput = $wgParser->parse( $text, $wgTitle,
index d03f210..4073245 100644 (file)
@@ -10,7 +10,6 @@
  */
 function wfSpecialAllmessages() {
        global $wgOut, $wgAllMessagesEn, $wgRequest, $wgMessageCache, $wgTitle;
-       global $wgLanguageCode, $wgContLanguageCode, $wgContLang;
        global $wgUseDatabaseMessages;
 
        if(!$wgUseDatabaseMessages) {
@@ -88,7 +87,7 @@ function makePhp($messages) {
  *
  */
 function makeHTMLText( $messages ) {
-       global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode, $wgContLang;
+       global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode;
        $fname = "makeHTMLText";
        wfProfileIn( $fname );
        
index d7d915d..904b087 100644 (file)
@@ -188,7 +188,7 @@ function showToplevel ( $namespace = NS_MAIN, $including = false ) {
  * @param integer $namespace (Default NS_MAIN)
  */
 function showline( $inpoint, $outpoint, $namespace = NS_MAIN ) {
-       global $wgOut, $wgLang, $wgUser;
+       global $wgOut, $wgUser;
        $sk = $wgUser->getSkin();
        $dbr =& wfGetDB( DB_SLAVE );
 
index 0a9d2ba..7d4b262 100644 (file)
@@ -48,8 +48,7 @@ class IPBlockForm {
        }
        
        function showForm( $err ) {
-               global $wgOut, $wgUser, $wgLang;
-               global $wgRequest, $wgSysopUserBans;
+               global $wgOut, $wgUser, $wgRequest, $wgSysopUserBans;
 
                $wgOut->setPagetitle( wfMsg( 'blockip' ) );
                $wgOut->addWikiText( wfMsg( 'blockiptext' ) );
@@ -143,8 +142,7 @@ class IPBlockForm {
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgLang;
-               global $wgSysopUserBans, $wgSysopRangeBans;
+               global $wgOut, $wgUser, $wgSysopUserBans, $wgSysopRangeBans;
                
                $userId = 0;
                $this->BlockAddress = trim( $this->BlockAddress );
index 3431bcd..de5c3c8 100644 (file)
@@ -47,7 +47,7 @@ class BookSourceList {
        }
        
        function showList() {
-               global $wgOut, $wgUser, $wgContLang;
+               global $wgOut, $wgContLang;
                $fname = "BookSourceList::showList()";
                
                # First, see if we have a custom list setup in
@@ -90,7 +90,7 @@ class BookSourceList {
        }
        
        function askForm() {
-               global $wgOut, $wgLang, $wgTitle;
+               global $wgOut, $wgTitle;
                $fname = "BookSourceList::askForm()";
                
                $action = $wgTitle->escapeLocalUrl();
index 9615101..90da68f 100644 (file)
@@ -49,7 +49,6 @@ class CategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
                $plink = $skin->makeLinkObj( $title, $title->getText() );
                $nlinks = wfMsg( 'nlinks', $result->count );
index b8f4ba3..ed82684 100644 (file)
@@ -56,7 +56,6 @@ class DisambiguationsPage extends PageQueryPage {
        }
        
        function formatResult( $skin, $result ) {
-               global $wgContLang ;
                $title = Title::newFromId( $result->value );
         $dp = Title::makeTitle( $result->namespace, $result->title );
 
index 498076d..2c6e139 100644 (file)
@@ -79,7 +79,7 @@ class EmailUserForm {
        }
 
        function showForm() {
-               global $wgOut, $wgUser, $wgLang;
+               global $wgOut, $wgUser;
 
                $wgOut->setPagetitle( wfMsg( "emailpage" ) );
                $wgOut->addWikiText( wfMsg( "emailpagetext" ) );
@@ -127,7 +127,7 @@ class EmailUserForm {
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
+               global $wgOut, $wgUser;
            
                $from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
                $subject = wfQuotedPrintable( $this->subject );
index 99d02c5..c3df5e9 100644 (file)
@@ -30,7 +30,7 @@ require_once( 'Export.php' );
  *
  */
 function wfSpecialExport( $page = '' ) {
-       global $wgOut, $wgLang, $wgRequest;
+       global $wgOut, $wgRequest;
        
        if( $wgRequest->getVal( 'action' ) == 'submit') {
                $page = $wgRequest->getText( 'pages' );
index 1ac3384..feed860 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 function wfSpecialImagelist() {
-       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode;
+       global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode;
        
        $sort = $wgRequest->getVal( 'sort' );
        $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
index 467bee5..37a4bc9 100644 (file)
@@ -30,8 +30,7 @@ require_once( 'WikiError.php' );
  * Constructor
  */
 function wfSpecialImport( $page = '' ) {
-       global $wgUser, $wgOut, $wgLang, $wgRequest, $wgTitle;
-       global $wgImportSources;
+       global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgImportSources;
        
        ###
 #      $wgOut->addWikiText( "Special:Import is not ready for this beta release, sorry." );
index ad76832..da635f1 100644 (file)
@@ -47,9 +47,8 @@ class IPUnblockForm {
                $this->reason = $reason;
        }
        
-       function showForm( $err )
-       {
-               global $wgOut, $wgUser, $wgLang, $wgSysopUserBans;
+       function showForm( $err ) {
+               global $wgOut, $wgUser, $wgSysopUserBans;
 
                $wgOut->setPagetitle( wfMsg( 'unblockip' ) );
                $wgOut->addWikiText( wfMsg( 'unblockiptext' ) );
@@ -94,7 +93,7 @@ class IPUnblockForm {
        }
        
        function doSubmit() {
-               global $wgOut, $wgUser, $wgLang;
+               global $wgOut, $wgUser;
 
                $block = new Block();
                $this->ip = trim( $this->ip );
@@ -174,7 +173,7 @@ class IPUnblockForm {
         * Callback function to output a block
         */
        function addRow( $block, $tag ) {
-               global $wgOut, $wgUser, $wgLang, $wgContLang;
+               global $wgOut, $wgUser, $wgLang;
                
                if( $this->ip != '' ) {
                        if( $block->mAuto ) {
index 62bfb88..49a3c11 100644 (file)
@@ -176,7 +176,6 @@ class ListUsersPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
                
                $userPage = Title::makeTitle( $result->namespace, $result->title );
                $name = $skin->makeLinkObj( $userPage, htmlspecialchars( $userPage->getText() ) );
index 7297022..d0be5d8 100644 (file)
@@ -41,9 +41,8 @@ class DBLockForm {
                $this->reason = $wgRequest->getText( 'wpLockReason' );
        }
        
-       function showForm( $err )
-       {
-               global $wgOut, $wgUser, $wgLang;
+       function showForm( $err ) {
+               global $wgOut, $wgUser;
 
                $wgOut->setPagetitle( wfMsg( 'lockdb' ) );
                $wgOut->addWikiText( wfMsg( 'lockdbtext' ) );
index 961248c..7f265cd 100644 (file)
@@ -18,7 +18,7 @@ function sns() {
  * Entry point
  */
 function wfSpecialMaintenance( $par=NULL ) {
-       global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest, $wgContLanguageCode;
+       global $wgUser, $wgOut, $wgContLang, $wgRequest, $wgContLanguageCode;
        global $wgMiserMode;
 
        # This pages is expensive ressource wise
@@ -96,7 +96,7 @@ function wfSpecialMaintenance( $par=NULL ) {
  * Generate a maintenance page link
  */
 function getMPL ( $x ) {
-       global $wgUser , $wgLang;
+       global $wgUser;
        $sk = $wgUser->getSkin() ;
        return $sk->makeKnownLink( sns().":Maintenance" , wfMsg($x), 'subfunction='.$x ) ;
 }
@@ -150,7 +150,7 @@ function wfSpecialDisambiguations() {
  * @deprecated
  */
 function wfSpecialSelfLinks() {
-       global $wgUser, $wgOut, $wgLang, $wgTitle;
+       global $wgUser, $wgOut;
        $fname = 'wfSpecialSelfLinks';
 
        list( $limit, $offset ) = wfCheckLimits();
@@ -186,7 +186,7 @@ function wfSpecialSelfLinks() {
  * 
  */
 function wfSpecialMispeelings () {
-       global $wgUser, $wgOut, $wgContLang, $wgTitle;
+       global $wgUser, $wgOut, $wgContLang;
        $sk = $wgUser->getSkin();
        $fname = 'wfSpecialMispeelings';
 
@@ -255,7 +255,7 @@ function wfSpecialMispeelings () {
  *
  */
 function wfSpecialMissingLanguageLinks() {
-       global $wgUser, $wgOut, $wgContLang, $wgTitle, $wgRequest;
+       global $wgUser, $wgOut, $wgContLang, $wgRequest;
        
        $fname = 'wfSpecialMissingLanguageLinks';
        $thelang = $wgRequest->getText( 'thelang' );
index 0bc51c8..bb8d143 100644 (file)
@@ -59,7 +59,7 @@ class MovePageForm {
        }
        
        function showForm( $err ) {
-               global $wgOut, $wgUser, $wgLang;
+               global $wgOut, $wgUser;
 
                $wgOut->setPagetitle( wfMsg( 'movepage' ) );
 
@@ -167,9 +167,7 @@ class MovePageForm {
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgLang;
-               global $wgDeferredUpdateList, $wgMessageCache;
-               global  $wgUseSquid, $wgRequest;
+               global $wgOut, $wgUser, $wgRequest;
                $fname = "MovePageForm::doSubmit";
                
                if ( $wgUser->pingLimiter( 'move' ) ) {
index 53138af..d1c6417 100644 (file)
@@ -11,7 +11,7 @@
  *               used as e.g. Special:Randompage/Category
  */
 function wfSpecialRandompage( $par = NS_MAIN ) {
-       global $wgOut, $wgTitle, $wgArticle, $wgExtraRandompageSQL, $wgContLang;
+       global $wgOut, $wgExtraRandompageSQL, $wgContLang;
        $fname = 'wfSpecialRandompage';
 
        # Determine the namespace to get a random page from.
index 6758b0a..543422c 100644 (file)
@@ -16,9 +16,7 @@ require_once( 'Revision.php' );
  * Constructor
  */
 function wfSpecialRecentchanges( $par, $specialPage ) {
-       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgMemc, $wgDBname;
-       global $wgRequest, $wgSitename, $wgLanguageCode, $wgContLanguageCode;
-       global $wgFeedClasses, $wgUseRCPatrol;
+       global $wgUser, $wgOut, $wgRequest, $wgUseRCPatrol;
        global $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
        global $wgLinkCache;
        $fname = 'wfSpecialRecentchanges';
index 5ebaef7..8239b0a 100644 (file)
@@ -15,7 +15,7 @@ require_once( 'SpecialRecentchanges.php' );
  * @param string $par parent page we will look at
  */
 function wfSpecialRecentchangeslinked( $par = NULL ) {
-       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgTitle, $wgRequest;
+       global $wgUser, $wgOut, $wgContLang, $wgRequest;
        $fname = 'wfSpecialRecentchangeslinked';
 
        $days = $wgRequest->getInt( 'days' );
index 91b7147..f63677f 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 function wfSpecialSpecialpages() {
-       global $wgLang, $wgOut, $wgUser, $wgAvailableRights;
+       global $wgOut, $wgUser, $wgAvailableRights;
        
        $wgOut->setRobotpolicy( 'index,nofollow' );
        $sk = $wgUser->getSkin();
@@ -41,7 +41,7 @@ function wfSpecialSpecialpages() {
  * @param $sk skin object ???
  */
 function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
-       global $wgLang, $wgOut, $wgSortSpecialPages;
+       global $wgOut, $wgSortSpecialPages;
 
        if( count( $pages ) == 0 ) {
                # Yeah, that was pointless. Thanks for coming.
index 5e45cc0..e6684d0 100644 (file)
@@ -9,7 +9,7 @@
 * constructor
 */
 function wfSpecialStatistics() {
-       global $wgUser, $wgOut, $wgLang, $wgRequest;
+       global $wgOut, $wgLang, $wgRequest;
        $fname = 'wfSpecialStatistics';
 
        $action = $wgRequest->getVal( 'action' );
index 271c56d..111e8ff 100644 (file)
@@ -155,9 +155,7 @@ class PageArchive {
         * @return bool
         */
        function undelete( $timestamps ) {
-               global $wgUser, $wgOut, $wgLang, $wgDeferredUpdateList;
-               global $wgUseSquid, $wgInternalServer, $wgLinkCache;
-               global $wgDBtype;
+               global $wgDeferredUpdateList, $wgLinkCache, $wgDBtype;
 
                $fname = "doUndeleteArticle";
                $restoreAll = empty( $timestamps );
@@ -349,12 +347,11 @@ class UndeleteForm {
        }
 
        function execute() {
-               global $wgOut;
                
                if( is_null( $this->mTargetObj ) ) {
                        return $this->showList();
                }
-               if( $this->mTimestamp !== "" ) {
+               if( $this->mTimestamp !== '' ) {
                        return $this->showRevision( $this->mTimestamp );
                }
                if( $this->mRestore && $this->mAction == "submit" ) {
index 9184ab0..6ff28c7 100644 (file)
@@ -36,7 +36,7 @@ function wfSpecialUnlockdb() {
 class DBUnlockForm {
        function showForm( $err )
        {
-               global $wgOut, $wgUser, $wgLang;
+               global $wgOut, $wgUser;
 
                $wgOut->setPagetitle( wfMsg( "unlockdb" ) );
                $wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
@@ -76,8 +76,7 @@ END
        }
 
        function doSubmit() {
-               global $wgOut, $wgUser, $wgLang;
-               global $wgRequest, $wgReadOnlyFile;
+               global $wgOut, $wgUser, $wgRequest, $wgReadOnlyFile;
 
                $wpLockConfirm = $wgRequest->getCheck( 'wpLockConfirm' );
                if ( ! $wpLockConfirm ) {
index 9ab9505..409f2ea 100644 (file)
@@ -37,7 +37,6 @@ class UnusedCategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang;
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
                return $skin->makeLinkObj( $title, $title->getText() );
        }
index d09b868..9f8b63f 100644 (file)
@@ -141,9 +141,7 @@ class UploadForm {
         * @access private
         */
        function processUpload() {
-               global $wgUser, $wgOut, $wgLang, $wgContLang;
-               global $wgUploadDirectory;
-               global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
+               global $wgUser, $wgOut, $wgUploadDirectory;
 
                /* Check for PHP error if any, requires php 4.2 or newer */
                if ( $this->mUploadError == 1/*UPLOAD_ERR_INI_SIZE*/ ) {
@@ -483,7 +481,7 @@ class UploadForm {
         * @access private
         */
        function uploadWarning( $warning ) {
-               global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+               global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
                global $wgUseCopyrightUpload;
 
                $this->mSessionKey = $this->stashSession();
@@ -547,7 +545,7 @@ class UploadForm {
         * @access private
         */
        function mainUploadForm( $msg='' ) {
-               global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+               global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
                global $wgUseCopyrightUpload;
 
                $cols = intval($wgUser->getOption( 'cols' ));
index 6519d51..4a88a65 100644 (file)
@@ -34,7 +34,7 @@ class UploadFormMogile extends UploadForm {
         * @param bool $useRename  Not used in this implementation
         */
        function saveUploadedFile( $saveName, $tempName, $useRename = false ) {
-               global $wgUploadDirectory, $wgOut;
+               global $wgOut;
                $mfs = MogileFS::NewMogileFS();
 
                $this->mSavedFile = "image!{$saveName}";
index f304ac0..719be81 100644 (file)
@@ -162,7 +162,7 @@ class LoginForm {
         */
        function addNewAccountInternal() {
                global $wgUser, $wgOut;
-               global $wgUseLatin1, $wgEnableSorbs, $wgProxyWhitelist;
+               global $wgEnableSorbs, $wgProxyWhitelist;
                global $wgMemc, $wgAccountCreationThrottle, $wgDBname;
                global $wgAuth, $wgMinimalPasswordLength;
 
@@ -343,8 +343,7 @@ class LoginForm {
         * @access private
         */
        function mailPassword() {
-               global $wgUser, $wgDeferredUpdateList, $wgOutputEncoding;
-               global $wgCookiePath, $wgCookieDomain, $wgDBname;
+               global $wgUser, $wgDBname;
 
                if ( '' == $this->mName ) {
                        $this->mainLoginForm( wfMsg( 'noname' ) );
@@ -376,8 +375,7 @@ class LoginForm {
         * @access private
         */
        function mailPasswordInternal( $u ) {
-               global $wgPasswordSender, $wgDBname;
-               global $wgCookiePath, $wgCookieDomain;
+               global $wgDBname, $wgCookiePath, $wgCookieDomain;
 
                if ( '' == $u->getEmail() ) {
                        return wfMsg( 'noemail', $u->getName() );
index 0a34a8e..58da683 100644 (file)
@@ -9,7 +9,7 @@
  * constructor
  */
 function wfSpecialUserlogout() {
-       global $wgUser, $wgOut, $returnto;
+       global $wgUser, $wgOut;
 
        if (wfRunHooks('UserLogout', array(&$wgUser))) {
                
index 5754f6e..5c7f78a 100644 (file)
@@ -847,25 +847,22 @@ class Validation {
  * constructor
  */
 function wfSpecialValidate( $page = '' ) {
-       global $wgOut, $wgRequest, $wgUseValidation, $wgUser, $wgContLang;
+       global $wgOut, $wgRequest, $wgUseValidation, $wgUser;
        
        if( !$wgUseValidation ) {
                $wgOut->errorpage( "nosuchspecialpage", "nospecialpagetext" );
                return;
        }
 
-
        # Can do?
        if( ! $wgUser->isBureaucrat() ) {#isAllowed('change_validation') ) {
                $wgOut->sysopRequired();
                return;
        }
-       
 
        $mode = $wgRequest->getVal( "mode" );
        $skin = $wgUser->getSkin();
 
-       
        if( $mode == "manage" ) {
                $v = new Validation();
                $html = $v->manageTopics();
index 2b99798..4ab7c21 100644 (file)
@@ -15,7 +15,7 @@ require_once( 'WatchedItem.php' );
  * constructor
  */
 function wfSpecialWatchlist( $par ) {
-       global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest, $wgContLang;
+       global $wgUser, $wgOut, $wgLang, $wgMemc, $wgRequest, $wgContLang;
        global $wgUseWatchlistCache, $wgWLCacheTimeout, $wgDBname;
        global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
        global $wgEnotifWatchlist, $wgFilterRobotsWL;
index 0c44bb9..eb7266e 100644 (file)
@@ -3,7 +3,6 @@
 
 /** */
 function wfStreamFile( $fname ) {
-       global $wgSquidMaxage;
        $stat = @stat( $fname );
        if ( !$stat ) {
                header( 'HTTP/1.0 404 Not Found' );
index 064c1f2..2fc4788 100644 (file)
@@ -161,7 +161,6 @@ class Title {
         * @access public
         */
        function newFromURL( $url ) {
-               global $wgLang, $wgServer;
                $t = new Title();
 
                # For compatibility with old buggy URLs. "+" is not valid in titles,
@@ -332,7 +331,7 @@ class Title {
         *      search index
         */
        /* static */ function indexTitle( $ns, $title ) {
-               global $wgDBminWordLen, $wgContLang;
+               global $wgContLang;
                require_once( 'SearchEngine.php' );
 
                $lc = SearchEngine::legalSearchChars() . '&#;';
@@ -469,7 +468,6 @@ class Title {
         * @access public
         */
        function touchArray( $titles, $timestamp = '' ) {
-               global $wgUseFileCache;
 
                if ( count( $titles ) == 0 ) {
                        return;
index 294bac7..9e96e92 100644 (file)
@@ -676,7 +676,6 @@ class User {
         * Load a user from the database
         */
        function loadFromDatabase() {
-               global $wgCommandLineMode;
                $fname = "User::loadFromDatabase";
 
                # Counter-intuitive, breaks various things, use User::setLoaded() if you want to suppress
index fd87388..0097620 100644 (file)
@@ -48,7 +48,7 @@ function wfRFC822Phrase( $phrase ) {
  * @param string $replyto optional reply-to email (default : false)
  */
 function userMailer( $to, $from, $subject, $body, $replyto=false ) {
-       global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString, $wgEmergencyContact;
+       global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString;
 
        if (is_array( $wgSMTP )) {
                require_once( 'Mail.php' );
@@ -155,13 +155,8 @@ class EmailNotification {
        function notifyOnPageChange(&$title, $timestamp, $summary, $minorEdit, $oldid=false) {
 
                # we use $wgEmergencyContact as sender's address
-               global $wgUser, $wgLang, $wgEmergencyContact;
-               global $wgEnotifWatchlist, $wgEnotifMinorEdits;
-               global $wgEnotifUserTalk;
-               global $wgEnotifRevealEditorAddress;
-               global $wgEnotifFromEditor;
-               global $wgEmailAuthentication;
-               global $wgShowUpdatedMarker;
+               global $wgUser, $wgEnotifWatchlist;
+               global $wgEnotifMinorEdits, $wgEnotifUserTalk, $wgShowUpdatedMarker;
 
                $fname = 'UserMailer::notifyOnPageChange';
                wfProfileIn( $fname );
@@ -237,10 +232,8 @@ class EmailNotification {
         * @access private
         */
        function composeCommonMailtext() {
-               global $wgLang, $wgUser, $wgEmergencyContact;
-               global $wgEnotifRevealEditorAddress;
-               global $wgEnotifFromEditor;
-               global $wgNoReplyAddress;
+               global $wgUser, $wgEmergencyContact, $wgNoReplyAddress;
+               global $wgEnotifFromEditor, $wgEnotifRevealEditorAddress;
 
                $summary = ($this->summary == '') ? ' - ' : $this->summary;
                $medit   = ($this->minorEdit) ? wfMsg( 'minoredit' ) : '';
index 7c61406..46cf42f 100644 (file)
@@ -45,7 +45,7 @@ class UserTalkUpdate {
         * @param $timestamp
         */
        function UserTalkUpdate( $action, $ns, $title, $summary, $minoredit, $timestamp) {
-               global $wgUser, $wgLang, $wgMemc, $wgDBname;
+               global $wgUser, $wgMemc, $wgDBname;
                $fname = 'UserTalkUpdate::UserTalkUpdate';
 
                $this->mAction = $action;
index 400392f..9cb49e9 100644 (file)
@@ -109,7 +109,7 @@ class WebRequest {
         */
        function getGPCVal( &$arr, $name, $default ) {
                if( isset( $arr[$name] ) ) {
-                       global $wgServer, $wgContLang;
+                       global $wgContLang;
                        $data = $arr[$name];
                        if( isset( $_GET[$name] ) && !is_array( $data ) ) {
                                # Check for alternate/legacy character encoding.