r69839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69838‎ | r69839 | r69840 >
Date:19:11, 24 July 2010
Author:reedy
Status:ok
Tags:
Comment:
Removal of unused globals

Removal of one setting of a variable to '', then not using further
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)
  • /trunk/phase3/includes/ChangesFeed.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/Exception.php (modified) (history)
  • /trunk/phase3/includes/FileRevertForm.php (modified) (history)
  • /trunk/phase3/includes/ForkController.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/HTMLFileCache.php (modified) (history)
  • /trunk/phase3/includes/Html.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/LinkCache.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/Metadata.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/includes/ProfilerSimpleText.php (modified) (history)
  • /trunk/phase3/includes/RawPage.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/StreamFile.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/UserMailer.php (modified) (history)
  • /trunk/phase3/includes/UserRightsProxy.php (modified) (history)
  • /trunk/phase3/includes/WikiMap.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/installer/CoreInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteInstaller.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialActiveusers.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialEmailuser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialImport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialIpblocklist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLinkSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialProtectedtitles.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisionMove.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWithoutinterwiki.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileRevertForm.php
@@ -88,7 +88,7 @@
8989 * Show the confirmation form
9090 */
9191 protected function showForm() {
92 - global $wgOut, $wgUser, $wgRequest, $wgLang, $wgContLang;
 92+ global $wgOut, $wgUser, $wgLang, $wgContLang;
9393 $timestamp = $this->getTimestamp();
9494
9595 $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getAction() ) );
Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -163,7 +163,6 @@
164164 }
165165
166166 if ( $status->isGood() ) {
167 - global $wgLocalFileRepo;
168167 $file = $this->getLocalFile();
169168
170169 $wgUser->leaveUserMessage( wfMsg( 'successfulupload' ),
Index: trunk/phase3/includes/CategoryPage.php
@@ -85,7 +85,7 @@
8686 * @private
8787 */
8888 function getHTML() {
89 - global $wgOut, $wgCategoryMagicGallery, $wgCategoryPagingLimit, $wgContLang;
 89+ global $wgOut, $wgCategoryMagicGallery, $wgContLang;
9090 wfProfileIn( __METHOD__ );
9191
9292 $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
Index: trunk/phase3/includes/User.php
@@ -859,7 +859,7 @@
860860 * @return \bool True if the user is logged in, false otherwise.
861861 */
862862 private function loadFromSession() {
863 - global $wgMemc, $wgCookiePrefix, $wgExternalAuthType, $wgAutocreatePolicy;
 863+ global $wgCookiePrefix, $wgExternalAuthType, $wgAutocreatePolicy;
864864
865865 $result = null;
866866 wfRunHooks( 'UserLoadFromSession', array( $this, &$result ) );
Index: trunk/phase3/includes/search/SearchEngine.php
@@ -857,7 +857,7 @@
858858 * @return String
859859 */
860860 public function highlightText( $text, $terms, $contextlines, $contextchars ) {
861 - global $wgLang, $wgContLang;
 861+ global $wgContLang;
862862 global $wgSearchHighlightBoundaries;
863863 $fname = __METHOD__;
864864
@@ -1131,8 +1131,6 @@
11321132 * @return String
11331133 */
11341134 function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) {
1135 - global $wgContLang;
1136 -
11371135 if ( $start != 0 )
11381136 $start = $this->position( $text, $start, 1 );
11391137 if ( $end >= strlen( $text ) )
@@ -1283,7 +1281,7 @@
12841282 * @return String
12851283 */
12861284 public function highlightSimple( $text, $terms, $contextlines, $contextchars ) {
1287 - global $wgLang, $wgContLang;
 1285+ global $wgContLang;
12881286 $fname = __METHOD__;
12891287
12901288 $lines = explode( "\n", $text );
Index: trunk/phase3/includes/GlobalFunctions.php
@@ -704,7 +704,7 @@
705705 * @return string
706706 */
707707 function wfMsgGetKey( $key, $useDB, $langCode = false, $transform = true ) {
708 - global $wgContLang, $wgMessageCache;
 708+ global $wgMessageCache;
709709
710710 wfRunHooks('NormalizeMessageKey', array(&$key, &$useDB, &$langCode, &$transform));
711711
@@ -2060,7 +2060,7 @@
20612061 }
20622062
20632063 function wfGetSiteNotice() {
2064 - global $wgUser, $wgSiteNotice;
 2064+ global $wgUser;
20652065 $fname = 'wfGetSiteNotice';
20662066 wfProfileIn( $fname );
20672067 $siteNotice = '';
Index: trunk/phase3/includes/ProfilerSimpleText.php
@@ -22,8 +22,6 @@
2323 static private $out;
2424
2525 function getFunctionReport() {
26 - global $wgRequest, $wgOut;
27 -
2826 if($this->mTemplated) {
2927 uasort($this->mCollated,array('self','sort'));
3028 array_walk($this->mCollated,array('self','format'));
Index: trunk/phase3/includes/parser/Parser.php
@@ -3496,8 +3496,6 @@
34973497 * @param $frame PPFrame
34983498 */
34993499 function extensionSubstitution( $params, $frame ) {
3500 - global $wgRawHtml, $wgContLang;
3501 -
35023500 $name = $frame->expand( $params['name'] );
35033501 $attrText = !isset( $params['attr'] ) ? null : $frame->expand( $params['attr'] );
35043502 $content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
Index: trunk/phase3/includes/ImagePage.php
@@ -143,7 +143,6 @@
144144 $wgOut->addHTML( $html );
145145
146146 if ( $showmeta ) {
147 - global $wgStylePath, $wgStyleVersion;
148147 $expand = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-expand' ) ) );
149148 $collapse = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-collapse' ) ) );
150149 $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ) . "\n" );
@@ -880,7 +879,7 @@
881880 }
882881
883882 public function imageHistoryLine( $iscur, $file ) {
884 - global $wgUser, $wgLang, $wgContLang;
 883+ global $wgUser, $wgLang;
885884
886885 $timestamp = wfTimestamp( TS_MW, $file->getTimestamp() );
887886 $img = $iscur ? $file->getName() : $file->getArchiveName();
Index: trunk/phase3/includes/Linker.php
@@ -583,7 +583,7 @@
584584 }
585585
586586 function makeThumbLink2( Title $title, $file, $frameParams = array(), $handlerParams = array(), $time = false, $query = "" ) {
587 - global $wgStylePath, $wgContLang;
 587+ global $wgStylePath;
588588 $exists = $file && $file->exists();
589589
590590 # Shortcuts
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -992,8 +992,6 @@
993993 }
994994
995995 function setup_database() {
996 - global $wgVersion, $wgDBmwschema, $wgDBts2schema, $wgDBport, $wgDBuser;
997 -
998996 $res = $this->sourceFile( "../maintenance/ora/tables.sql" );
999997 if ($res === true) {
1000998 print " done.</li>\n";
Index: trunk/phase3/includes/db/Database.php
@@ -554,7 +554,6 @@
555555 * @param $tempIgnore Boolean
556556 */
557557 function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
558 - global $wgCommandLineMode;
559558 # Ignore errors during error handling to avoid infinite recursion
560559 $ignore = $this->ignoreErrors( true );
561560 ++$this->mErrorCount;
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -403,7 +403,6 @@
404404 * @param $wiki String: wiki ID
405405 */
406406 public function &getConnection( $i, $groups = array(), $wiki = false ) {
407 - global $wgDBtype;
408407 wfProfileIn( __METHOD__ );
409408
410409 if ( $i == DB_LAST ) {
Index: trunk/phase3/includes/UserMailer.php
@@ -359,7 +359,6 @@
360360 # we use $wgPasswordSender as sender's address
361361 global $wgEnotifWatchlist;
362362 global $wgEnotifMinorEdits, $wgEnotifUserTalk;
363 - global $wgEnotifImpersonal;
364363
365364 wfProfileIn( __METHOD__ );
366365
Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -258,7 +258,6 @@
259259 * Get the name of an image from its title object
260260 */
261261 function getNameFromTitle( $title ) {
262 - global $wgCapitalLinks;
263262 if ( $this->initialCapital != MWNamespace::isCapitalized( NS_FILE ) ) {
264263 global $wgContLang;
265264 $name = $title->getUserCaseDBKey();
Index: trunk/phase3/includes/EditPage.php
@@ -765,7 +765,7 @@
766766 * @return one of the constants describing the result
767767 */
768768 function internalAttemptSave( &$result, $bot = false ) {
769 - global $wgFilterCallback, $wgUser, $wgOut, $wgParser;
 769+ global $wgFilterCallback, $wgUser, $wgParser;
770770 global $wgMaxArticleSize;
771771
772772 wfProfileIn( __METHOD__ );
@@ -1848,7 +1848,7 @@
18491849 * @return string
18501850 */
18511851 function getPreviewText() {
1852 - global $wgOut, $wgUser, $wgTitle, $wgParser, $wgLang, $wgContLang, $wgMessageCache;
 1852+ global $wgOut, $wgUser, $wgParser, $wgMessageCache;
18531853
18541854 wfProfileIn( __METHOD__ );
18551855
Index: trunk/phase3/includes/ChangesFeed.php
@@ -45,8 +45,7 @@
4646 * @return null or true
4747 */
4848 public function execute( $feed, $rows, $lastmod, $opts ) {
49 - global $messageMemc, $wgFeedCacheTimeout;
50 - global $wgSitename, $wgLang, $wgRenderHashAppend;
 49+ global $wgLang, $wgRenderHashAppend;
5150
5251 if ( !FeedUtils::checkFeedOutput( $this->format ) ) {
5352 return;
Index: trunk/phase3/includes/OutputPage.php
@@ -2090,8 +2090,8 @@
20912091 * @return String: The doctype, opening <html>, and head element.
20922092 */
20932093 public function headElement( Skin $sk, $includeStyle = true ) {
2094 - global $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
2095 - global $wgContLang, $wgUseTrackbacks, $wgStyleVersion, $wgHtml5;
 2094+ global $wgOutputEncoding, $wgMimeType;
 2095+ global $wgUseTrackbacks, $wgHtml5;
20962096 global $wgUser, $wgRequest, $wgLang;
20972097
20982098 if ( $sk->commonPrintStylesheet() ) {
Index: trunk/phase3/includes/LogEventsList.php
@@ -357,7 +357,7 @@
358358
359359 // @TODO: split up!
360360 private function logActionLinks( $row, $title, $paramArray, &$comment ) {
361 - global $wgUser, $wgLang;
 361+ global $wgUser;
362362 if( ( $this->flags & self::NO_ACTION_LINK ) // we don't want to see the action
363363 || self::isDeleted( $row, LogPage::DELETED_ACTION ) ) // action is hidden
364364 {
@@ -913,7 +913,6 @@
914914 }
915915
916916 public function getQueryInfo() {
917 - global $wgOut;
918917 $tables = array( 'logging', 'user' );
919918 $this->mConds[] = 'user_id = log_user';
920919 $index = array();
Index: trunk/phase3/includes/Html.php
@@ -595,7 +595,7 @@
596596 $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
597597 }
598598
599 - global $wgHtml5, $wgHtml5Version, $wgWellFormedXml, $wgDocType, $wgDTD;
 599+ global $wgHtml5, $wgHtml5Version, $wgDocType, $wgDTD;
600600 global $wgXhtmlNamespaces, $wgXhtmlDefaultNamespace;
601601 if ( $wgHtml5 ) {
602602 $ret .= "<!DOCTYPE html>\n";
Index: trunk/phase3/includes/installer/CoreInstaller.php
@@ -275,8 +275,6 @@
276276 * @return Status
277277 */
278278 public function installExtensions() {
279 - global $wgHooks, $wgAutoloadClasses;
280 -
281279 $exts = $this->getVar( '_Extensions' );
282280 $path = $this->getVar( 'IP' ) . '/extensions';
283281
Index: trunk/phase3/includes/installer/SqliteInstaller.php
@@ -36,7 +36,6 @@
3737 }
3838
3939 public function submitConnectForm() {
40 - global $wgSQLiteDataDir;
4140 $this->setVarsFromRequest( array( 'wgSQLiteDataDir', 'wgDBname' ) );
4241
4342 $dir = realpath( $this->getVar( 'wgSQLiteDataDir' ) );
Index: trunk/phase3/includes/WikiMap.php
@@ -12,7 +12,7 @@
1313 * @return WikiReference object or null if the wiki was not found
1414 */
1515 public static function getWiki( $wikiID ) {
16 - global $wgConf, $IP;
 16+ global $wgConf;
1717
1818 $wgConf->loadFullData();
1919
Index: trunk/phase3/includes/MagicWord.php
@@ -514,7 +514,6 @@
515515 * Add a magic word by name
516516 */
517517 public function add( $name ) {
518 - global $wgContLang;
519518 $this->names[] = $name;
520519 $this->hash = $this->baseRegex = $this->regex = null;
521520 }
@@ -657,7 +656,6 @@
658657 * Both elements are false if there was no match.
659658 */
660659 public function matchVariableStartToEnd( $text ) {
661 - global $wgContLang;
662660 $regexes = $this->getVariableStartToEndRegex();
663661 foreach ( $regexes as $regex ) {
664662 if ( $regex !== '' ) {
Index: trunk/phase3/includes/Title.php
@@ -789,7 +789,7 @@
790790 * @return \type{\string} the URL
791791 */
792792 public function getFullURL( $query = '', $variant = false ) {
793 - global $wgContLang, $wgServer, $wgRequest;
 793+ global $wgServer, $wgRequest;
794794
795795 if ( is_array( $query ) ) {
796796 $query = wfArrayToCGI( $query );
@@ -3230,7 +3230,7 @@
32313231 * Ignored if the user doesn't have the suppressredirect right
32323232 */
32333233 private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
3234 - global $wgUseSquid, $wgUser, $wgContLang;
 3234+ global $wgUser, $wgContLang;
32353235
32363236 $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
32373237 if ( $reason ) {
@@ -4042,8 +4042,7 @@
40434043 * @return Boolean
40444044 */
40454045 public function canUseNoindex() {
4046 - global $wgArticleRobotPolicies, $wgContentNamespaces,
4047 - $wgExemptFromUserRobotsControl;
 4046+ global $wgContentNamespaces, $wgExemptFromUserRobotsControl;
40484047
40494048 $bannedNamespaces = is_null( $wgExemptFromUserRobotsControl )
40504049 ? $wgContentNamespaces
Index: trunk/phase3/includes/RawPage.php
@@ -109,7 +109,7 @@
110110 }
111111
112112 function view() {
113 - global $wgOut, $wgScript, $wgRequest;
 113+ global $wgOut, $wgRequest;
114114
115115 if( $wgRequest->isPathInfoBad() ) {
116116 # Internet Explorer will ignore the Content-Type header if it
@@ -158,7 +158,7 @@
159159 }
160160
161161 function getRawText() {
162 - global $wgUser, $wgOut, $wgRequest;
 162+ global $wgUser, $wgOut;
163163 if( $this->mGen ) {
164164 $sk = $wgUser->getSkin();
165165 if( !StubObject::isRealObject( $wgOut ) )
Index: trunk/phase3/includes/HTMLFileCache.php
@@ -30,7 +30,7 @@
3131
3232 public function fileCacheName() {
3333 if( !$this->mFileCache ) {
34 - global $wgCacheDirectory, $wgFileCacheDirectory, $wgRequest;
 34+ global $wgCacheDirectory, $wgFileCacheDirectory;
3535
3636 if ( $wgFileCacheDirectory ) {
3737 $dir = $wgFileCacheDirectory;
Index: trunk/phase3/includes/StreamFile.php
@@ -91,7 +91,7 @@
9292 */
9393 if ( $safe ) {
9494 global $wgFileBlacklist, $wgCheckFileExtensions, $wgStrictFileExtensions,
95 - $wgFileExtensions, $wgVerifyMimeType, $wgMimeTypeBlacklist, $wgRequest;
 95+ $wgFileExtensions, $wgVerifyMimeType, $wgMimeTypeBlacklist;
9696 list( $partName, $extList ) = UploadBase::splitExtensions( $filename );
9797 if ( UploadBase::checkFileExtensionList( $extList, $wgFileBlacklist ) ) {
9898 return 'unknown/unknown';
Index: trunk/phase3/includes/SkinTemplate.php
@@ -875,7 +875,7 @@
876876 */
877877 function buildNavUrls() {
878878 global $wgUseTrackbacks, $wgOut, $wgUser, $wgRequest;
879 - global $wgEnableUploads, $wgUploadNavigationUrl;
 879+ global $wgUploadNavigationUrl;
880880
881881 wfProfileIn( __METHOD__ );
882882
Index: trunk/phase3/includes/ForkController.php
@@ -126,8 +126,6 @@
127127 * Fork a number of worker processes.
128128 */
129129 protected function forkWorkers( $numProcs ) {
130 - global $wgMemc, $wgCaches, $wgMainCacheType;
131 -
132130 $this->prepareEnvironment();
133131
134132 // Create the child processes
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -159,7 +159,7 @@
160160 * @return null
161161 */
162162 function saveUserGroups( $username, $reason = '' ) {
163 - global $wgRequest, $wgUser, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
 163+ global $wgRequest, $wgOut;
164164
165165 $status = $this->fetchUser( $username );
166166 if( !$status->isOK() ) {
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -721,7 +721,7 @@
722722
723723 // Generic list of deleted pages
724724 private function showList( $result ) {
725 - global $wgLang, $wgContLang, $wgUser, $wgOut;
 725+ global $wgLang, $wgUser, $wgOut;
726726
727727 if( $result->numRows() == 0 ) {
728728 $wgOut->addWikiMsg( 'undelete-no-results' );
@@ -1015,7 +1015,7 @@
10161016 }
10171017
10181018 private function showHistory( ) {
1019 - global $wgLang, $wgUser, $wgOut;
 1019+ global $wgUser, $wgOut;
10201020
10211021 $sk = $wgUser->getSkin();
10221022 if( $this->mAllowed ) {
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -105,7 +105,7 @@
106106 * @return String
107107 */
108108 public function execute( $par ) {
109 - global $wgLang, $wgOut;
 109+ global $wgOut;
110110
111111 $this->setHeaders();
112112 $this->outputHeader();
Index: trunk/phase3/includes/specials/SpecialImport.php
@@ -132,7 +132,7 @@
133133 }
134134
135135 private function showForm() {
136 - global $wgUser, $wgOut, $wgRequest, $wgImportSources, $wgExportMaxLinkDepth;
 136+ global $wgUser, $wgOut, $wgImportSources, $wgExportMaxLinkDepth;
137137 if( !$wgUser->isAllowed( 'import' ) && !$wgUser->isAllowed( 'importupload' ) )
138138 return $wgOut->permissionRequired( 'import' );
139139
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php
@@ -362,7 +362,7 @@
363363 }
364364
365365 function searchForm() {
366 - global $wgScript, $wgRequest, $wgLang;
 366+ global $wgScript, $wgLang;
367367
368368 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
369369 $nondefaults = array();
Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -194,8 +194,6 @@
195195 * not returning full history)
196196 */
197197 private function doExport( $page, $history, $list_authors ) {
198 - global $wgExportMaxHistory;
199 -
200198 $pageSet = array(); // Inverted index of all pages to look up
201199
202200 // Split up and normalize input
@@ -347,7 +345,7 @@
348346 * Validate link depth setting, if available.
349347 */
350348 private function validateLinkDepth( $depth ) {
351 - global $wgExportMaxLinkDepth, $wgExportMaxLinkDepthLimit;
 349+ global $wgExportMaxLinkDepth;
352350 if( $depth < 0 ) {
353351 return 0;
354352 }
Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -38,7 +38,7 @@
3939 }
4040
4141 public function execute( $par ) {
42 - global $wgOut, $wgRequest, $wgMessageCache, $wgMemc;
 42+ global $wgOut, $wgRequest, $wgMemc;
4343 global $wgDisableCounters, $wgMiserMode;
4444
4545 $this->setHeaders();
@@ -123,7 +123,6 @@
124124 * @return string table row in HTML format
125125 */
126126 private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) {
127 - global $wgStylePath;
128127 if( $descMsg ) {
129128 $descriptionText = wfMsgExt( $descMsg, array( 'parseinline' ), $descMsgParam );
130129 if ( !wfEmptyMsg( $descMsg, $descriptionText ) ) {
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -624,7 +624,7 @@
625625 }
626626
627627 function processLogin() {
628 - global $wgUser, $wgAuth;
 628+ global $wgUser;
629629
630630 switch ( $this->authenticateUserData() ) {
631631 case self::SUCCESS:
@@ -803,7 +803,7 @@
804804 * @private
805805 */
806806 function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
807 - global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry;
 807+ global $wgServer, $wgScript, $wgNewPasswordExpiry;
808808
809809 if ( $u->getEmail() == '' ) {
810810 return new WikiError( wfMsg( 'noemail', $u->getName() ) );
@@ -838,7 +838,7 @@
839839 * @private
840840 */
841841 function successfulLogin() {
842 - global $wgUser, $wgOut;
 842+ global $wgOut;
843843
844844 # Run any hooks; display injected HTML if any, else redirect
845845 $injected_html = '';
@@ -862,8 +862,7 @@
863863 * @private
864864 */
865865 function successfulCreation() {
866 - global $wgUser, $wgOut;
867 -
 866+ global $wgUser;
868867 # Run any hooks; display injected HTML
869868 $injected_html = '';
870869 wfRunHooks('UserLoginComplete', array(&$wgUser, &$injected_html));
Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php
@@ -69,7 +69,7 @@
7070 * Callback function to output a restriction
7171 */
7272 function formatRow( $row ) {
73 - global $wgUser, $wgLang, $wgContLang;
 73+ global $wgUser, $wgLang;
7474
7575 wfProfileIn( __METHOD__ );
7676
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -30,7 +30,7 @@
3131 }
3232
3333 public function execute( $par ) {
34 - global $wgUser, $wgOut, $wgLang, $wgRequest;
 34+ global $wgUser, $wgOut, $wgRequest;
3535
3636 $this->setHeaders();
3737 $this->outputHeader();
@@ -380,7 +380,7 @@
381381 * @param $type String
382382 */
383383 protected function feed( $type ) {
384 - global $wgRequest, $wgFeed, $wgFeedClasses, $wgFeedLimit;
 384+ global $wgFeed, $wgFeedClasses, $wgFeedLimit;
385385
386386 if( !$wgFeed ) {
387387 global $wgOut;
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -135,7 +135,7 @@
136136 * Special page entry point
137137 */
138138 public function execute( $par ) {
139 - global $wgUser, $wgOut, $wgRequest;
 139+ global $wgUser, $wgOut;
140140
141141 $this->setHeaders();
142142 $this->outputHeader();
@@ -630,7 +630,7 @@
631631 * @return String: empty string if there is no warning or an HTML fragment
632632 */
633633 public static function getExistsWarning( $exists ) {
634 - global $wgUser, $wgContLang;
 634+ global $wgUser;
635635
636636 if ( !$exists ) {
637637 return '';
@@ -878,7 +878,6 @@
879879 global $wgLang, $wgCheckFileExtensions, $wgStrictFileExtensions,
880880 $wgFileExtensions, $wgFileBlacklist;
881881
882 - $allowedExtensions = '';
883882 if( $wgCheckFileExtensions ) {
884883 if( $wgStrictFileExtensions ) {
885884 # Everything not permitted is banned
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -72,8 +72,6 @@
7373 * @return wiki text showing the license information
7474 */
7575 static function MediaWikiCredits() {
76 - global $wgContLang;
77 -
7876 $ret = Xml::element( 'h2', array( 'id' => 'mw-version-license' ), wfMsg( 'version-license' ) );
7977
8078 // This text is always left-to-right.
Index: trunk/phase3/includes/specials/SpecialWithoutinterwiki.php
@@ -89,7 +89,7 @@
9090 }
9191
9292 function wfSpecialWithoutinterwiki() {
93 - global $wgRequest, $wgContLang;
 93+ global $wgRequest;
9494 list( $limit, $offset ) = wfCheckLimits();
9595 // Only searching the mainspace anyway
9696 $prefix = Title::capitalize( $wgRequest->getVal( 'prefix' ), NS_MAIN );
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -276,7 +276,7 @@
277277 return;
278278 }
279279
280 - global $wgOut, $wgLang, $wgRequest;
 280+ global $wgOut, $wgRequest;
281281
282282 $wgOut->setPageTitle( wfMsgExt( 'deletedcontributions-title', array( 'parsemag' ) ) );
283283
@@ -463,7 +463,7 @@
464464 * @param $options Array: the options to be included.
465465 */
466466 function getForm( $options ) {
467 - global $wgScript, $wgRequest;
 467+ global $wgScript;
468468
469469 $options['title'] = SpecialPage::getTitleFor( 'DeletedContributions' )->getPrefixedText();
470470 if ( !isset( $options['target'] ) ) {
Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -176,7 +176,7 @@
177177 }
178178
179179 function getPageHeader( ) {
180 - global $wgScript, $wgRequest;
 180+ global $wgScript;
181181 $self = $this->getTitle();
182182
183183 # Form tag
@@ -270,7 +270,7 @@
271271 * $par string (optional) A group to list users from
272272 */
273273 function wfSpecialListusers( $par = null ) {
274 - global $wgRequest, $wgOut;
 274+ global $wgOut;
275275
276276 $up = new UsersPager($par);
277277
Index: trunk/phase3/includes/specials/SpecialActiveusers.php
@@ -126,7 +126,7 @@
127127 }
128128
129129 function getPageHeader() {
130 - global $wgScript, $wgRequest;
 130+ global $wgScript;
131131
132132 $self = $this->getTitle();
133133 $limit = $this->mLimit ? Xml::hidden( 'limit', $this->mLimit ) : '';
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -36,7 +36,7 @@
3737 $wgUser->saveSettings();
3838 }
3939
40 - global $wgServer, $wgScriptPath, $wgFeedClasses;
 40+ global $wgFeedClasses;
4141 $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
4242 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken );
4343 $feedTemplate = wfScript('api').'?';
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -347,7 +347,7 @@
348348 }
349349
350350 function doSubmit() {
351 - global $wgOut, $wgUser, $wgRequest, $wgMaximumMovedPages, $wgLang;
 351+ global $wgOut, $wgUser, $wgMaximumMovedPages, $wgLang;
352352 global $wgFixDoubleRedirects;
353353
354354 if ( $wgUser->pingLimiter( 'move' ) ) {
Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -443,7 +443,7 @@
444444 * @param $terms Array: terms to highlight
445445 */
446446 protected function showHit( $result, $terms ) {
447 - global $wgContLang, $wgLang, $wgUser;
 447+ global $wgLang, $wgUser;
448448 wfProfileIn( __METHOD__ );
449449
450450 if( $result->isBrokenTitle() ) {
@@ -667,7 +667,6 @@
668668 */
669669 protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions) {
670670 wfProfileIn( __METHOD__ );
671 - global $wgContLang, $wgLang;
672671
673672 if( $result->isBrokenTitle() ) {
674673 wfProfileOut( __METHOD__ );
@@ -745,8 +744,6 @@
746745 * @return String: HTML form
747746 */
748747 protected function powerSearchBox( $term ) {
749 - global $wgScript, $wgContLang;
750 -
751748 // Groups namespaces into rows according to subject
752749 $rows = array();
753750 foreach( SearchEngine::searchableNamespaces() as $namespace => $name ) {
@@ -894,7 +891,7 @@
895892 }
896893
897894 protected function formHeader( $term, $resultsShown, $totalNum ) {
898 - global $wgContLang, $wgLang;
 895+ global $wgLang;
899896
900897 $out = Xml::openElement('div', array( 'class' => 'mw-search-formheader' ) );
901898
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -157,7 +157,7 @@
158158 }
159159
160160 private function showHistory() {
161 - global $wgLang, $wgUser, $wgOut;
 161+ global $wgUser, $wgOut;
162162
163163 $this->sk = $wgUser->getSkin();
164164
Index: trunk/phase3/includes/specials/SpecialLinkSearch.php
@@ -31,7 +31,7 @@
3232 function wfSpecialLinkSearch( $par ) {
3333
3434 list( $limit, $offset ) = wfCheckLimits();
35 - global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, $wgLang;
 35+ global $wgOut, $wgUrlProtocols, $wgMiserMode, $wgLang;
3636 $target = $GLOBALS['wgRequest']->getVal( 'target', $par );
3737 $namespace = $GLOBALS['wgRequest']->getIntorNull( 'namespace', null );
3838
Index: trunk/phase3/includes/specials/SpecialRevisionMove.php
@@ -69,7 +69,7 @@
7070 * Mostly initializes variables and calls either showForm() or submit()
7171 */
7272 public function execute( $par ) {
73 - global $wgUser, $wgOut, $wgSkin;
 73+ global $wgUser, $wgOut;
7474
7575 $this->setHeaders();
7676 $this->outputHeader();
@@ -234,8 +234,6 @@
235235 * This function actually move the revision. NEVER call this function, call submit()
236236 */
237237 protected function moveRevisions() {
238 - global $wgOut;
239 -
240238 $oldArticle = new Article( $this->mOldTitle );
241239 $newArticle = new Article( $this->mNewTitle );
242240
Index: trunk/phase3/includes/specials/SpecialEmailuser.php
@@ -217,7 +217,7 @@
218218 * @return Mixed: True on success, String on error
219219 */
220220 public static function submit( $data ) {
221 - global $wgUser, $wgUserEmailUseReplyTo, $wgSiteName;
 221+ global $wgUser, $wgUserEmailUseReplyTo;
222222
223223 $target = self::getTarget( $data['Target'] );
224224 if( !$target instanceof User ){
Index: trunk/phase3/includes/Metadata.php
@@ -115,8 +115,6 @@
116116 }
117117
118118 protected function person($name, User $user ){
119 - global $wgContLang;
120 -
121119 if( $user->isAnon() ){
122120 $this->element( $name, wfMsgExt( 'anonymous', array( 'parsemag' ), 1 ) );
123121 } else if( $real = $user->getRealName() ) {
Index: trunk/phase3/includes/Preferences.php
@@ -35,8 +35,6 @@
3636 if ( self::$defaultPreferences )
3737 return self::$defaultPreferences;
3838
39 - global $wgRCMaxAge;
40 -
4139 $defaultPreferences = array();
4240
4341 self::profilePreferences( $user, $defaultPreferences );
@@ -62,7 +60,6 @@
6361 }
6462
6563 ## Prod in defaults from the user
66 - global $wgDefaultUserOptions;
6764 foreach ( $defaultPreferences as $name => &$info ) {
6865 $prefFromUser = self::getOptionFromUser( $name, $info, $user );
6966 $field = HTMLForm::loadInputFromParameters( $info ); // For validation
Index: trunk/phase3/includes/UserRightsProxy.php
@@ -105,7 +105,7 @@
106106 * @return DatabaseBase or null if invalid selection
107107 */
108108 public static function getDB( $database ) {
109 - global $wgLocalDatabases, $wgDBname;
 109+ global $wgDBname;
110110 if( self::validDatabase( $database ) ) {
111111 if( $database == $wgDBname ) {
112112 // Hmm... this shouldn't happen though. :)
Index: trunk/phase3/includes/Skin.php
@@ -372,7 +372,7 @@
373373 global $wgUseAjax, $wgAjaxWatch;
374374 global $wgVersion, $wgEnableAPI, $wgEnableWriteAPI;
375375 global $wgRestrictionTypes;
376 - global $wgMWSuggestTemplate, $wgDBname, $wgEnableMWSuggest;
 376+ global $wgDBname, $wgEnableMWSuggest;
377377 global $wgSitename;
378378
379379 $ns = $wgTitle->getNamespace();
@@ -597,8 +597,8 @@
598598 * @private
599599 */
600600 function setupUserCss( OutputPage $out ) {
601 - global $wgRequest, $wgContLang, $wgUser;
602 - global $wgAllowUserCss, $wgUseSiteCss, $wgSquidMaxage, $wgStylePath;
 601+ global $wgRequest, $wgUser;
 602+ global $wgAllowUserCss, $wgUseSiteCss, $wgSquidMaxage;
603603
604604 wfProfileIn( __METHOD__ );
605605
@@ -1088,7 +1088,7 @@
10891089 }
10901090
10911091 function getUndeleteLink() {
1092 - global $wgUser, $wgContLang, $wgLang, $wgRequest;
 1092+ global $wgUser, $wgLang, $wgRequest;
10931093
10941094 $action = $wgRequest->getVal( 'action', 'view' );
10951095
@@ -1609,7 +1609,7 @@
16101610 * Show a drop-down box of special pages
16111611 */
16121612 function specialPagesList() {
1613 - global $wgUser, $wgContLang, $wgServer, $wgRedirectScript;
 1613+ global $wgContLang, $wgServer, $wgRedirectScript;
16141614 $pages = array_merge( SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages() );
16151615 foreach ( $pages as $name => $page ) {
16161616 $pages[$name] = $page->getDescription();
Index: trunk/phase3/includes/Exception.php
@@ -197,7 +197,7 @@
198198 * $wgOut to output the exception.
199199 */
200200 function htmlHeader() {
201 - global $wgLogo, $wgSitename, $wgOutputEncoding;
 201+ global $wgLogo, $wgOutputEncoding;
202202
203203 if ( !headers_sent() ) {
204204 header( 'HTTP/1.0 500 Internal Server Error' );
Index: trunk/phase3/includes/LinkCache.php
@@ -132,7 +132,7 @@
133133 * @return Integer
134134 */
135135 public function addLinkObj( $nt ) {
136 - global $wgAntiLockFlags, $wgProfiler;
 136+ global $wgAntiLockFlags;
137137 wfProfileIn( __METHOD__ );
138138
139139 $key = $nt->getPrefixedDBkey();

Status & tagging log