r49993 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49992‎ | r49993 | r49994 >
Date:03:03, 28 April 2009
Author:demon
Status:ok
Tags:
Comment:
Kill a bunch of unused $wgUser
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPatrol.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRemoveRestrictions.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/languages/classes/LanguageWa.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageWa.php
@@ -15,8 +15,6 @@
1616 ### "<day> d' <monthname>" for months starting with a vowel
1717 ###
1818 function date( $ts, $adj = false, $format = true, $tc = false ) {
19 - global $wgUser;
20 -
2119 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
2220 $datePreference = $this->dateFormat( $format );
2321
Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -1398,7 +1398,7 @@
13991399 * Run the transaction
14001400 */
14011401 function execute() {
1402 - global $wgUser, $wgUseSquid;
 1402+ global $wgUseSquid;
14031403 wfProfileIn( __METHOD__ );
14041404
14051405 $this->file->lock();
@@ -1540,7 +1540,7 @@
15411541 * So we save the batch and let the caller call cleanup()
15421542 */
15431543 function execute() {
1544 - global $wgUser, $wgLang;
 1544+ global $wgLang;
15451545 if ( !$this->all && !$this->ids ) {
15461546 // Do nothing
15471547 return $this->file->repo->newGood();
Index: trunk/phase3/includes/ImagePage.php
@@ -481,7 +481,7 @@
482482 * Show a notice that the file is from a shared repository
483483 */
484484 protected function printSharedImageText() {
485 - global $wgOut, $wgUser;
 485+ global $wgOut;
486486
487487 $this->loadFile();
488488
Index: trunk/phase3/includes/api/ApiPatrol.php
@@ -41,7 +41,7 @@
4242 * Patrols the article or provides the reason the patrol failed.
4343 */
4444 public function execute() {
45 - global $wgUser, $wgUseRCPatrol, $wgUseNPPatrol;
 45+ global $wgUser;
4646 $params = $this->extractRequestParams();
4747
4848 if(!isset($params['token']))
Index: trunk/phase3/includes/Linker.php
@@ -443,7 +443,6 @@
444444 * @param $prefix String: optional prefix. As trail, only before instead of after.
445445 */
446446 function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
447 - global $wgUser;
448447 wfProfileIn( __METHOD__ );
449448
450449 $query = wfCgiToArray( $query );
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -948,8 +948,6 @@
949949 * @private
950950 */
951951 function onCookieRedirectCheck( $type ) {
952 - global $wgUser;
953 -
954952 if ( !$this->hasSessionCookie() ) {
955953 if ( $type == 'new' ) {
956954 return $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -67,7 +67,7 @@
6868 }
6969
7070 function execute() {
71 - global $wgOut, $wgUser;
 71+ global $wgOut;
7272
7373 $wgOut->setPagetitle( wfMsgHtml( "mergehistory" ) );
7474
@@ -218,7 +218,7 @@
219219 }
220220
221221 function formatRevisionRow( $row ) {
222 - global $wgUser, $wgLang;
 222+ global $wgLang;
223223
224224 $rev = new Revision( $row );
225225
@@ -270,7 +270,7 @@
271271 }
272272
273273 function merge() {
274 - global $wgOut, $wgUser;
 274+ global $wgOut;
275275 # Get the titles directly from the IDs, in case the target page params
276276 # were spoofed. The queries are done based on the IDs, so it's best to
277277 # keep it consistent...
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -473,7 +473,7 @@
474474 * @todo This would probably look a lot nicer in a table.
475475 */
476476 function formatRow( $row ) {
477 - global $wgLang, $wgUser, $wgContLang;
 477+ global $wgLang, $wgContLang;
478478 wfProfileIn( __METHOD__ );
479479
480480 $sk = $this->getSkin();
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -833,7 +833,7 @@
834834 * @return string HTML
835835 */
836836 function showDiff( $previousRev, $currentRev ) {
837 - global $wgOut, $wgUser;
 837+ global $wgOut;
838838
839839 $diffEngine = new DifferenceEngine();
840840 $diffEngine->showDiffStyle();
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -247,7 +247,7 @@
248248 * @return string
249249 */
250250 public function formatRow( $result ) {
251 - global $wgLang, $wgContLang, $wgUser;
 251+ global $wgLang, $wgContLang;
252252
253253 $classes = array();
254254
Index: trunk/phase3/includes/specials/SpecialRemoveRestrictions.php
@@ -46,7 +46,7 @@
4747 }
4848
4949 function wfSpecialRemoveRestrictionsProcess( $r ) {
50 - global $wgUser, $wgRequest;
 50+ global $wgRequest;
5151 $reason = $wgRequest->getVal( 'reason' );
5252 $result = $r->delete();
5353 $log = new LogPage( 'restrict' );
Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -288,7 +288,7 @@
289289 * @access private
290290 */
291291 function processUpload(){
292 - global $wgUser, $wgOut, $wgFileExtensions, $wgLang;
 292+ global $wgOut, $wgFileExtensions, $wgLang;
293293 $details = null;
294294 $value = null;
295295 $value = $this->internalProcessUpload( $details );
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -108,7 +108,7 @@
109109 function formatRow( $row ) {
110110 wfProfileIn( __METHOD__ );
111111
112 - global $wgLang, $wgUser;
 112+ global $wgLang;
113113
114114 $sk = $this->getSkin();
115115
Index: trunk/phase3/includes/EditPage.php
@@ -352,7 +352,7 @@
353353 * the newly-edited page.
354354 */
355355 function edit() {
356 - global $wgOut, $wgUser, $wgRequest;
 356+ global $wgOut, $wgRequest;
357357 // Allow extensions to modify/prevent this form or submission
358358 if ( !wfRunHooks( 'AlternateEdit', array( &$this ) ) ) {
359359 return;
Index: trunk/phase3/includes/Article.php
@@ -3569,7 +3569,7 @@
35703570 * @param $cache Boolean
35713571 */
35723572 public function outputWikiText( $text, $cache = true ) {
3573 - global $wgParser, $wgUser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
 3573+ global $wgParser, $wgOut, $wgEnableParserCache, $wgUseFileCache;
35743574
35753575 $popts = $wgOut->parserOptions();
35763576 $popts->setTidy(true);
Index: trunk/phase3/includes/LogEventsList.php
@@ -774,7 +774,6 @@
775775 * LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links
776776 */
777777 function __construct( &$reader, $flags = 0 ) {
778 - global $wgUser;
779778 wfDeprecated(__METHOD__);
780779 $this->reader =& $reader;
781780 $this->reader->pager->mLogEventsList->flags = $flags;
Index: trunk/phase3/includes/User.php
@@ -2375,7 +2375,6 @@
23762376 * Log this user out.
23772377 */
23782378 function logout() {
2379 - global $wgUser;
23802379 if( wfRunHooks( 'UserLogout', array(&$this) ) ) {
23812380 $this->doLogout();
23822381 }
Index: trunk/phase3/includes/Title.php
@@ -2996,7 +2996,7 @@
29972997 * arrays (errors) as values, or an error array with numeric indices if no pages were moved
29982998 */
29992999 public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true ) {
3000 - global $wgUser, $wgMaximumMovedPages;
 3000+ global $wgMaximumMovedPages;
30013001 // Check permissions
30023002 if( !$this->userCan( 'move-subpages' ) )
30033003 return array( 'cant-move-subpages' );

Status & tagging log