r69848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69847‎ | r69848 | r69849 >
Date:21:12, 24 July 2010
Author:reedy
Status:deferred
Tags:
Comment:
Nuke some more unused globals
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseLog.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewExamine.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewHistory.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewRevert.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewTools.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialAutoLogin.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialMergeAccount.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialWikiSets.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeText.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)
  • /trunk/extensions/CheckUser/install.inc (modified) (history)
  • /trunk/extensions/Cite/SpecialCite_body.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtFunctions.php (modified) (history)
  • /trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/api/ApiThreadAction.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Dispatch.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Hooks.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/ThreadHistoryPager.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Threads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialNewMessages.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)
  • /trunk/extensions/Translate/RcFilter.php (modified) (history)
  • /trunk/extensions/Translate/SpecialMagic.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslationChanges.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslationStats.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslations.php (modified) (history)
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)
  • /trunk/extensions/Translate/TranslateTasks.php (modified) (history)
  • /trunk/extensions/Translate/TranslateUtils.php (modified) (history)
  • /trunk/extensions/Translate/scripts/poimport.php (modified) (history)
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)
  • /trunk/extensions/Translate/tag/SpecialPageTranslation.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageIndexRebuilder.php (modified) (history)
  • /trunk/extensions/Translate/utils/MessageTable.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/install.inc
@@ -73,7 +73,7 @@
7474 }
7575
7676 function create_cu_log( $db ) {
77 - global $wgDBtype, $wgCheckUserLog, $wgDBname;
 77+ global $wgDBtype, $wgCheckUserLog;
7878 if( $db->tableExists( 'cu_log' ) ) {
7979 echo "...cu_log already exists\n";
8080 return;
Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -310,7 +310,7 @@
311311 * Shows first and last date and number of edits
312312 */
313313 protected function doUserIPsRequest( $user , $reason = '', $period = 0 ) {
314 - global $wgOut, $wgLang, $wgUser;
 314+ global $wgOut, $wgLang;
315315
316316 $userTitle = Title::newFromText( $user, NS_USER );
317317 if ( !is_null( $userTitle ) ) {
@@ -450,7 +450,7 @@
451451 * Shows all edits in Recent Changes by this IP (or range) and who made them
452452 */
453453 protected function doIPEditsRequest( $ip, $xfor = false, $reason = '', $period = 0 ) {
454 - global $wgUser, $wgOut, $wgLang;
 454+ global $wgOut, $wgLang;
455455 $dbr = wfGetDB( DB_SLAVE );
456456 # Invalid IPs are passed in as a blank string
457457 $ip_conds = $this->getIpConds( $dbr, $ip, $xfor );
@@ -587,7 +587,7 @@
588588 * Shows all edits in Recent Changes by this user
589589 */
590590 protected function doUserEditsRequest( $user, $reason = '', $period = 0 ) {
591 - global $wgUser, $wgOut, $wgLang;
 591+ global $wgOut;
592592
593593 $userTitle = Title::newFromText( $user, NS_USER );
594594 if ( !is_null( $userTitle ) ) {
Index: trunk/extensions/CheckUser/CheckUser.php
@@ -76,7 +76,6 @@
7777 * Saves user data into the cu_changes table
7878 */
7979 function efUpdateCheckUserData( $rc ) {
80 - global $wgUser;
8180 // Extract params
8281 extract( $rc->mAttribs );
8382 // Get IP
Index: trunk/extensions/LiquidThreads/classes/Hooks.php
@@ -35,8 +35,6 @@
3636
3737 // Custom display for new posts.
3838 if ( $rc->mAttribs['rc_new'] ) {
39 - global $wgOut;
40 -
4139 // Article link, timestamp, user
4240 $s = '';
4341 $s .= $sk->link( $thread->getTitle() );
@@ -304,8 +302,7 @@
305303 }
306304
307305 public static function onLoadExtensionSchemaUpdates() {
308 - global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields,
309 - $wgExtPGAlteredFields, $wgExtNewIndexes, $wgDBtype;
 306+ global $wgExtNewTables, $wgExtNewFields, $wgExtNewIndexes;
310307
311308 $dir = realpath( dirname( __FILE__ ) . '/..' );
312309
Index: trunk/extensions/LiquidThreads/classes/ThreadHistoryPager.php
@@ -65,7 +65,7 @@
6666 }
6767
6868 function formatValue( $name, $value ) {
69 - global $wgOut, $wgLang, $wgTitle;
 69+ global $wgLang, $wgTitle;
7070
7171 static $sk = null;
7272
Index: trunk/extensions/LiquidThreads/classes/Threads.php
@@ -92,7 +92,6 @@
9393 }
9494
9595 static function where( $where, $options = array(), $bulkLoad = true ) {
96 - global $wgDBprefix;
9796 $dbr = wfGetDB( DB_SLAVE );
9897
9998 $res = $dbr->select( 'thread', '*', $where, __METHOD__, $options );
Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -1190,9 +1190,8 @@
11911191 return;
11921192 }
11931193
1194 - global $wgOut, $wgStylePath;
 1194+ global $wgOut;
11951195 global $wgStyleVersion;
1196 - global $wgEnableJS2system;
11971196 global $wgLiquidThreadsExtensionPath;
11981197
11991198 LqtHooks::$scriptVariables['wgLqtMessages'] = self::exportJSLocalisation();
@@ -1827,7 +1826,6 @@
18281827
18291828 function showThread( $thread, $levelNum = 1, $totalInLevel = 1,
18301829 $options = array() ) {
1831 - global $wgLang;
18321830
18331831 // Safeguard
18341832 if ( $thread->type() & Threads::TYPE_DELETED ||
@@ -2154,7 +2152,7 @@
21552153 }
21562154
21572155 static function getUserSignature( $user, $uid = null ) {
2158 - global $wgParser, $wgOut, $wgTitle;
 2156+ global $wgParser;
21592157 if ( !$user ) {
21602158 $user = User::newFromId( $uid );
21612159 }
@@ -2189,7 +2187,7 @@
21902188 }
21912189
21922190 static function signaturePST( $sig, $user ) {
2193 - global $wgParser, $wgOut, $wgTitle;
 2191+ global $wgParser, $wgTitle;
21942192
21952193 $title = $wgTitle ? $wgTitle : $user->getUserPage();
21962194
Index: trunk/extensions/LiquidThreads/classes/Dispatch.php
@@ -28,7 +28,6 @@
2929 */
3030 $action = $request->getVal( 'action' );
3131 $header_actions = array( 'history', 'edit', 'submit', 'delete' );
32 - global $wgRequest;
3332
3433 $lqt_action = $request->getVal( 'lqt_method' );
3534 if ( $action == 'edit' && $request->getVal( 'section' ) == 'new' ) {
Index: trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php
@@ -79,7 +79,7 @@
8080 }
8181
8282 function formatValue( $name, $value ) {
83 - global $wgOut, $wgLang, $wgTitle;
 83+ global $wgLang;
8484
8585 static $sk = null;
8686
Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -218,7 +218,7 @@
219219 }
220220
221221 // Expose feed links.
222 - global $wgFeedClasses, $wgScriptPath, $wgServer;
 222+ global $wgFeedClasses;
223223 $thread = $this->thread->topmostThread()->title()->getPrefixedText();
224224 $apiParams = array(
225225 'action' => 'feedthreads',
Index: trunk/extensions/LiquidThreads/pages/SpecialNewMessages.php
@@ -2,7 +2,7 @@
33 if ( !defined( 'MEDIAWIKI' ) ) die;
44
55 class SpecialNewMessages extends SpecialPage {
6 - private $user, $output, $request, $title;
 6+ private $user, $output, $request;
77
88 function __construct() {
99 SpecialPage::SpecialPage( 'NewMessages' );
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -231,7 +231,7 @@
232232 $this->output->setPageTitle( $this->title->getPrefixedText() );
233233
234234 // Expose feed links.
235 - global $wgFeedClasses, $wgScriptPath, $wgServer;
 235+ global $wgFeedClasses;
236236 $apiParams = array( 'action' => 'feedthreads', 'type' => 'replies|newthreads',
237237 'talkpage' => $this->title->getPrefixedText() );
238238 $urlPrefix = wfScript( 'api' ) . '?';
@@ -301,7 +301,6 @@
302302
303303 $this->output->addHTML( $talkpageHeader );
304304
305 - global $wgRequest;
306305 if ( $this->methodApplies( 'talkpage_new_thread' ) ) {
307306 $params = array( 'class' => 'lqt-new-thread lqt-edit-form' );
308307 $this->output->addHTML( Xml::openElement( 'div', $params ) );
Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php
@@ -43,7 +43,7 @@
4444 * Wrap the result as an RSS/Atom feed.
4545 */
4646 public function execute() {
47 - global $wgFeedClasses, $wgFeedLimit, $wgSitename, $wgContLanguageCode;
 47+ global $wgFeedClasses;
4848
4949 $params = $this->extractRequestParams();
5050
Index: trunk/extensions/LiquidThreads/api/ApiThreadAction.php
@@ -92,8 +92,6 @@
9393 }
9494
9595 public function actionSplit( $threads, $params ) {
96 - global $wgUser;
97 -
9896 if ( count( $threads ) > 1 ) {
9997 $this->dieUsage( 'You may only split one thread at a time',
10098 'too-many-threads' );
@@ -152,8 +150,6 @@
153151 }
154152
155153 public function actionMerge( $threads, $params ) {
156 - global $wgUser;
157 -
158154 if ( count( $threads ) < 1 ) {
159155 $this->dieUsage( 'You must specify a thread to merge',
160156 'no-specified-threads' );
Index: trunk/extensions/LiquidThreads/LqtFunctions.php
@@ -38,8 +38,6 @@
3939 }
4040
4141 function lqtSetupParserFunctions( &$parser ) {
42 - global $wgLiquidThreadsAllowUserControl;
43 -
4442 $parser->setFunctionHook(
4543 'useliquidthreads',
4644 array( 'LqtParserFunctions', 'useLiquidThreads' )
Index: trunk/extensions/CentralAuth/SpecialAutoLogin.php
@@ -14,7 +14,7 @@
1515 }
1616
1717 function execute( $par ) {
18 - global $wgRequest, $wgOut, $wgUser, $wgMemc, $IP;
 18+ global $wgRequest, $wgOut, $wgMemc;
1919
2020 $tempToken = $wgRequest->getVal( 'token' );
2121 $logout = $wgRequest->getBool( 'logout' );
Index: trunk/extensions/CentralAuth/SpecialWikiSets.php
@@ -66,7 +66,7 @@
6767 }
6868
6969 function buildMainView( $msg = '' ) {
70 - global $wgOut, $wgScript, $wgUser;
 70+ global $wgOut, $wgUser;
7171 $sk = $wgUser->getSkin();
7272
7373 $msgPostfix = $this->mCanEdit ? 'rw' : 'ro';
@@ -272,7 +272,7 @@
273273 }
274274
275275 function doDelete( $set ) {
276 - global $wgRequest, $wgContLang;
 276+ global $wgRequest;
277277
278278 $set = WikiSet::newFromID( $set );
279279 if ( !$set ) {
Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -1705,7 +1705,6 @@
17061706 }
17071707
17081708 protected function clearCookie( $name ) {
1709 - global $wgCentralAuthCookiePrefix;
17101709 self::setCookie( $name, '', - 86400 );
17111710 }
17121711
@@ -1742,8 +1741,6 @@
17431742 * Called on logout.
17441743 */
17451744 function deleteGlobalCookies() {
1746 - global $wgCentralAuthCookiePrefix;
1747 -
17481745 $this->clearCookie( 'User' );
17491746 $this->clearCookie( 'Token' );
17501747 $this->clearCookie( 'Session' );
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php
@@ -112,7 +112,7 @@
113113 }
114114
115115 function buildGroupView( $group ) {
116 - global $wgOut, $wgUser, $wgScript;
 116+ global $wgOut, $wgUser;
117117
118118 $editable = $this->userCanEdit( $wgUser );
119119
@@ -311,8 +311,6 @@
312312 }
313313
314314 function addLogEntry( $group, $addRights, $removeRights, $reason ) {
315 - global $wgRequest;
316 -
317315 $log = new LogPage( 'gblrights' );
318316
319317 $log->addEntry( 'groupprms2',
@@ -341,8 +339,6 @@
342340 }
343341
344342 function addLogEntry2( $group, $old, $new, $reason ) {
345 - global $wgRequest;
346 -
347343 $log = new LogPage( 'gblrights' );
348344
349345 $log->addEntry( 'groupprms3',
@@ -363,8 +359,6 @@
364360 }
365361
366362 function invalidateRightsCache( $group ) {
367 - global $wgMemc;
368 -
369363 // Figure out all the users in this group.
370364 $dbr = CentralAuthUser::getCentralDB();
371365
Index: trunk/extensions/CentralAuth/SpecialCentralAuth.php
@@ -86,7 +86,7 @@
8787 function doSubmit() {
8888 $deleted = false;
8989 $globalUser = $this->mGlobalUser;
90 - global $wgUser, $wgOut, $wgRequest;
 90+ global $wgUser, $wgRequest;
9191 if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {
9292 $this->showError( 'centralauth-token-mismatch' );
9393 } elseif ( $this->mMethod == 'unmerge' && $this->mCanUnmerge ) {
Index: trunk/extensions/CentralAuth/SpecialMergeAccount.php
@@ -209,7 +209,7 @@
210210 }
211211
212212 function doInitialMerge() {
213 - global $wgUser, $wgRequest, $wgOut, $wgCentralAuthDryRun;
 213+ global $wgUser, $wgCentralAuthDryRun;
214214 $globalUser = new CentralAuthUser( $wgUser->getName() );
215215
216216 if ( $wgCentralAuthDryRun ) {
@@ -297,7 +297,7 @@
298298 }
299299
300300 private function showWelcomeForm() {
301 - global $wgOut, $wgUser, $wgCentralAuthDryRun;
 301+ global $wgOut, $wgCentralAuthDryRun;
302302
303303 if ( $wgCentralAuthDryRun ) {
304304 $wgOut->addWikiText( wfMsg( 'centralauth-notice-dryrun' ) );
Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -382,8 +382,6 @@
383383 * Helper function for onUserLoadFromSession
384384 */
385385 static function initSession( $user, $token ) {
386 - global $wgAuth;
387 -
388386 $userName = $user->getName();
389387 wfSetupSession();
390388 if ( $token != @$_SESSION['globalloggedin'] ) {
@@ -545,7 +543,7 @@
546544 * Destroy local login cookies so that remote logout works
547545 */
548546 static function onUserSetCookies( $user, &$session, &$cookies ) {
549 - global $wgCentralAuthCookies, $wgCentralAuthCookieDomain;
 547+ global $wgCentralAuthCookies;
550548 if ( !$wgCentralAuthCookies || $user->isAnon() ) {
551549 return true;
552550 }
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php
@@ -17,7 +17,6 @@
1818 }
1919
2020 function getSuccessURL() {
21 - global $wgRequest;
2221 $knownWikis = $this->mGlobalUser->listAttached();
2322 $title = $this->getTitle( $this->mTarget );
2423 return $title->getFullURL( 'wpKnownWiki=' . urlencode( $knownWikis[0] ) );
@@ -54,8 +53,6 @@
5554 }
5655
5756 function changeableGroups() {
58 - global $wgUser;
59 -
6057 # # Should be a global user
6158 if ( !$this->mGlobalUser->exists() || !$this->mGlobalUser->isAttached() ) {
6259 return array();
@@ -73,7 +70,7 @@
7471 }
7572
7673 function fetchUser( $username ) {
77 - global $wgUser, $wgRequest;
 74+ global $wgRequest;
7875
7976 $knownwiki = $wgRequest->getVal( 'wpKnownWiki' );
8077
@@ -100,8 +97,6 @@
10198 }
10299
103100 function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
104 - global $wgRequest;
105 -
106101 $log = new LogPage( 'gblrights' );
107102
108103 $log->addEntry( 'usergroups',
Index: trunk/extensions/CentralNotice/SpecialNoticeText.php
@@ -226,7 +226,7 @@
227227 }
228228
229229 private function projectName() {
230 - global $wgConf, $IP;
 230+ global $wgConf;
231231
232232 $wgConf->loadFullData();
233233
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -351,8 +351,7 @@
352352 */
353353
354354 function listNotices() {
355 - global $wgOut, $wgRequest, $wgScript, $wgUser;
356 - global $wgNoticeProject, $wgUserLang;
 355+ global $wgOut, $wgUser, $wgUserLang;
357356
358357 // Get connection
359358 $dbr = wfGetDB( DB_SLAVE );
@@ -1173,8 +1172,6 @@
11741173 }
11751174
11761175 function removeTemplateFor( $noticeName, $templateName ) {
1177 - global $wgOut;
1178 -
11791176 $dbw = wfGetDB( DB_MASTER );
11801177 $dbw->begin();
11811178 $noticeId = $this->getNoticeId( $noticeName );
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -155,7 +155,7 @@
156156 }
157157
158158 function showAdd() {
159 - global $wgOut, $wgUser;
 159+ global $wgOut;
160160
161161 // Build HTML
162162 $htmlOut = Xml::openElement( 'form', array( 'method' => 'post' ) );
@@ -427,8 +427,6 @@
428428 }
429429
430430 private function updateMessage( $text, $translation, $lang, $token = false ) {
431 - global $wgUser;
432 -
433431 $title = Title::newFromText(
434432 ( $lang == 'en' ) ? "Centralnotice-{$text}" : "Centralnotice-{$text}/{$lang}",
435433 NS_MEDIAWIKI
@@ -438,8 +436,6 @@
439437 }
440438
441439 private function getTemplateId ( $templateName ) {
442 - global $wgOut, $egCentralNoticeTables;
443 -
444440 $dbr = wfGetDB( DB_SLAVE );
445441 $res = $dbr->select( 'cn_templates', 'tmp_id',
446442 array( 'tmp_name' => $templateName ),
@@ -454,7 +450,7 @@
455451 }
456452
457453 private function removeTemplate ( $name ) {
458 - global $wgOut, $egCentralNoticeTables;
 454+ global $wgOut;
459455
460456 // FIXME: weak comparison
461457 if ( $name == '' ) {
@@ -487,7 +483,7 @@
488484 }
489485
490486 private function addTemplate ( $name, $body ) {
491 - global $wgOut, $egCentralNoticeTables;
 487+ global $wgOut;
492488
493489 if ( $body == '' || $name == '' ) {
494490 $wgOut->addWikiMsg( 'centralnotice-null-string' );
@@ -530,7 +526,7 @@
531527 }
532528
533529 private function editTemplate ( $name, $body ) {
534 - global $wgOut, $egCentralNoticeTables;
 530+ global $wgOut;
535531
536532 if ( $body == '' || $name == '' ) {
537533 $wgOut->addWikiMsg( 'centralnotice-null-string' );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewExamine.php
@@ -4,7 +4,7 @@
55
66 class AbuseFilterViewExamine extends AbuseFilterView {
77 function show() {
8 - global $wgOut, $wgUser;
 8+ global $wgOut;
99
1010 $wgOut->setPageTitle( wfMsg( 'abusefilter-examine' ) );
1111 $wgOut->addWikiMsg( 'abusefilter-examine-intro' );
@@ -25,7 +25,7 @@
2626 }
2727
2828 function showSearch() {
29 - global $wgUser, $wgOut;
 29+ global $wgOut;
3030
3131 // Add selector
3232 $selector = '';
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewRevert.php
@@ -6,7 +6,7 @@
77 function show() {
88 $filter = $this->mPage->mFilter;
99
10 - global $wgUser, $wgRequest, $wgOut;
 10+ global $wgUser, $wgOut;
1111 $sk = $wgUser->getSkin();
1212
1313 if ( !$wgUser->isAllowed( 'abusefilter-revert' ) ) {
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewTools.php
@@ -4,7 +4,7 @@
55
66 class AbuseFilterViewTools extends AbuseFilterView {
77 function show() {
8 - global $wgRequest, $wgOut, $wgUser;
 8+ global $wgOut, $wgUser;
99
1010 // Header
1111 $wgOut->setSubTitle( wfMsg( 'abusefilter-tools-subtitle' ) );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewHistory.php
@@ -221,7 +221,7 @@
222222 ),
223223 );
224224
225 - global $wgRequest, $wgUser;
 225+ global $wgUser;
226226
227227 if ( $this->mUser ) {
228228 $info['conds']['afh_user_text'] = $this->mUser;
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -692,7 +692,7 @@
693693 }
694694
695695 public static function filterAction( $vars, $title ) {
696 - global $wgUser, $wgMemc, $wgTitle;
 696+ global $wgUser, $wgTitle;
697697
698698 wfProfileIn( __METHOD__ );
699699
Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php
@@ -70,7 +70,7 @@
7171 }
7272
7373 function searchForm() {
74 - global $wgOut, $wgUser;
 74+ global $wgOut;
7575
7676 $output = Xml::element( 'legend', null, wfMsg( 'abusefilter-log-search' ) );
7777 $fields = array();
Index: trunk/extensions/Cite/SpecialCite_body.php
@@ -14,7 +14,7 @@
1515 }
1616
1717 function execute( $par ) {
18 - global $wgOut, $wgRequest, $wgUseTidy;
 18+ global $wgRequest, $wgUseTidy;
1919 wfLoadExtensionMessages( 'SpecialCite' );
2020
2121 // Having tidy on causes whitespace and <pre> tags to
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -369,8 +369,6 @@
370370
371371 // TODO: fix the name
372372 public static function test( &$article, &$outputDone, &$pcache ) {
373 - global $wgOut;
374 -
375373 if ( !$article->getOldID() ) {
376374 self::header( $article->getTitle() );
377375 }
@@ -379,8 +377,6 @@
380378 }
381379
382380 public static function header( Title $title ) {
383 - global $wgLang, $wgUser;
384 -
385381 $page = TranslatablePage::newFromTitle( $title );
386382 $marked = $page->getMarkedTag();
387383 $ready = $page->getReadyTag();
Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php
@@ -338,7 +338,7 @@
339339
340340 /** Displays the sections and changes for the user to review */
341341 public function showPage( TranslatablePage $page, Array $sections ) {
342 - global $wgOut, $wgScript, $wgLang;
 342+ global $wgOut;
343343
344344 $wgOut->setSubtitle( $this->user->getSkin()->link( $page->getTitle() ) );
345345 TranslateUtils::injectCSS();
Index: trunk/extensions/Translate/SpecialTranslationChanges.php
@@ -199,10 +199,8 @@
200200 * GLOBALS: $wgLang
201201 */
202202 private static function makeBlock( $tl, $lang, $rowCache, $rowId ) {
203 - global $wgLang;
204 -
205203 $changes = count( $rowCache );
206 - $output = Xml::tags( 'h3', null, "$tl $lang ($nchanges)" );
 204+ $output = Xml::tags( 'h3', null, "$tl $lang ($changes)" );
207205 $output .= Xml::tags( 'ul',
208206 array( 'id' => $rowId, 'style' => 'display: none' ),
209207 implode( "\n", $rowCache )
Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -230,7 +230,7 @@
231231 }
232232
233233 private static function editBoxes( $object ) {
234 - global $wgTranslateDocumentationLanguageCode, $wgOut, $wgRequest;
 234+ global $wgOut, $wgRequest;
235235
236236 $th = new TranslationHelpers( $object->mTitle );
237237 if ( $object->firsttime && !$wgRequest->getCheck( 'oldid' ) && !$wgRequest->getCheck( 'undo' ) ) {
Index: trunk/extensions/Translate/Translate.php
@@ -534,7 +534,7 @@
535535 function wfAddNamespace( $id, $name ) {
536536 global $wgExtraNamespaces, $wgContentNamespaces,
537537 $wgTranslateMessageNamespaces, $wgNamespaceProtection,
538 - $wgNamespacesWithSubpages, $wgCapitalLinkOverrides;
 538+ $wgNamespacesWithSubpages;
539539
540540 $constant = strtoupper( "NS_$name" );
541541
Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -585,7 +585,7 @@
586586 }
587587
588588 protected function getOtherLanguagesBox() {
589 - global $wgLang, $wgUser;
 589+ global $wgLang;
590590
591591 $code = $this->targetLanguage;
592592 $page = $this->page;
@@ -635,7 +635,7 @@
636636 }
637637
638638 public function getDocumentationBox() {
639 - global $wgTranslateDocumentationLanguageCode, $wgUser, $wgOut;
 639+ global $wgTranslateDocumentationLanguageCode, $wgOut;
640640
641641 if ( !$wgTranslateDocumentationLanguageCode ) {
642642 return null;
@@ -853,8 +853,6 @@
854854 }
855855
856856 public function getLazySuggestionBox() {
857 - global $wgScript;
858 -
859857 if ( $this->group === null || !$this->targetLanguage ) {
860858 return null;
861859 }
Index: trunk/extensions/Translate/utils/MessageTable.php
@@ -55,7 +55,7 @@
5656 }
5757
5858 public function includeAssets() {
59 - global $wgOut, $wgScript;
 59+ global $wgOut;
6060
6161 // Our class
6262 $wgOut->addScriptFile( TranslateUtils::assetPath( 'js/quickedit.js' ) );
Index: trunk/extensions/Translate/utils/MessageIndexRebuilder.php
@@ -39,8 +39,6 @@
4040 self::checkAndAdd( $hugearray, $g, true );
4141 }
4242
43 - global $wgCacheDirectory;
44 -
4543 $filename = TranslateUtils::cacheFile( 'translate_messageindex.cdb' );
4644
4745 $writer = CdbWriter::open( $filename );
Index: trunk/extensions/Translate/SpecialTranslations.php
@@ -106,7 +106,7 @@
107107 }
108108
109109 function showTranslations( Title $title ) {
110 - global $wgOut, $wgUser, $wgContLang, $wgLang;
 110+ global $wgOut, $wgUser;
111111
112112 $sk = $wgUser->getSkin();
113113
Index: trunk/extensions/Translate/scripts/poimport.php
@@ -178,7 +178,6 @@
179179 private $changes = array();
180180 private $dryrun = true;
181181 private $allclear = false;
182 - private $user = '';
183182 private $group = null;
184183
185184 /**
Index: trunk/extensions/Translate/TranslateTasks.php
@@ -253,7 +253,7 @@
254254 }
255255
256256 public function output() {
257 - global $IP, $wgServer, $wgTranslateDocumentationLanguageCode;
 257+ global $wgServer, $wgTranslateDocumentationLanguageCode;
258258
259259 $lang = Language::factory( 'en' );
260260
Index: trunk/extensions/Translate/RcFilter.php
@@ -59,8 +59,6 @@
6060 * @return Boolean true
6161 */
6262 public static function translationFilterForm( &$items, $opts ) {
63 - global $wgRequest;
64 -
6563 $opts->consumeValue( 'translations' );
6664 $default = $opts->getValue( 'translations' );
6765
Index: trunk/extensions/Translate/TranslateUtils.php
@@ -166,8 +166,6 @@
167167 }
168168
169169 public static function languageSelector( $language, $selectedId ) {
170 - global $wgLang;
171 -
172170 if ( is_callable( array( 'LanguageNames', 'getNames' ) ) ) {
173171 $languages = LanguageNames::getNames( $language,
174172 LanguageNames::FALLBACK_NORMAL,
@@ -304,7 +302,7 @@
305303 }
306304
307305 public static function snippet( &$text, $length = 10 ) {
308 - global $wgLegalTitleChars, $wgContLang;
 306+ global $wgContLang;
309307
310308 $snippet = preg_replace( "/[^\p{L}]/u", ' ', $text );
311309 $snippet = preg_replace( "/ {2,}/u", ' ', $snippet );
Index: trunk/extensions/Translate/SpecialTranslationStats.php
@@ -169,7 +169,6 @@
170170 }
171171
172172 protected function eLanguage( $name, FormOptions $opts ) {
173 - global $wgLang;
174173 $value = $opts[$name];
175174
176175 $select = $this->languageSelector();
@@ -206,7 +205,6 @@
207206 }
208207
209208 protected function eGroup( $name, FormOptions $opts ) {
210 - global $wgLang;
211209 $value = $opts[$name];
212210
213211 $select = $this->groupSelector();
Index: trunk/extensions/Translate/SpecialMagic.php
@@ -115,7 +115,7 @@
116116 * GLOBALS: $wgRequest, $wgOut, $wgUser, $wgLang
117117 */
118118 public function execute( $parameters ) {
119 - global $wgUser, $wgOut, $wgRequest, $wgLang;
 119+ global $wgUser, $wgOut, $wgRequest;
120120
121121 $this->setup( $parameters );
122122 $this->setHeaders();

Status & tagging log