r69880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69879‎ | r69880 | r69881 >
Date:17:47, 25 July 2010
Author:reedy
Status:ok
Tags:
Comment:
More unused globals
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/WebRequest.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/extauth/vB.php (modified) (history)
  • /trunk/phase3/includes/installer/CliInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /trunk/phase3/includes/media/PNG.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser_LinkHooks.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)
  • /trunk/phase3/maintenance/tests/ApiSetup.php (modified) (history)
  • /trunk/phase3/maintenance/tests/SearchDbTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/TimeAdjustTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/TitlePermissionTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/UploadFromUrlTest.php (modified) (history)
  • /trunk/phase3/maintenance/tests/UploadFromUrlTestSuite.php (modified) (history)
  • /trunk/phase3/maintenance/tests/selenium/Selenium.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -1259,7 +1259,6 @@
12601260 * and all that fun stuff
12611261 */
12621262 function start() {
1263 - global $wgDBtype;
12641263 parent::start();
12651264
12661265 if ( ! $this->db->tableExists( 'testrun' )
Index: trunk/phase3/maintenance/tests/UploadFromUrlTestSuite.php
@@ -16,7 +16,7 @@
1717 $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
1818 $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
1919 $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
20 - $wgNamespacesWithSubpages, $wgThumbnailScriptPath, $wgScriptPath,
 20+ $wgThumbnailScriptPath, $wgScriptPath,
2121 $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
2222
2323 $wgScript = '/index.php';
@@ -45,7 +45,7 @@
4646 $messageMemc =& wfGetMessageCacheStorage();
4747 $parserMemc =& wfGetParserCacheStorage();
4848
49 - $wgContLang = new StubContLang;
 49+ //$wgContLang = new StubContLang;
5050 $wgUser = new StubUser;
5151 $wgLang = new StubUserLang;
5252 $wgOut = new StubObject( 'wgOut', 'OutputPage' );
Index: trunk/phase3/maintenance/tests/TimeAdjustTest.php
@@ -17,7 +17,7 @@
1818
1919 # Test offset usage for a given language::userAdjust
2020 function testUserAdjust() {
21 - global $wgLocalTZoffset, $wgContLang, $wgUser;
 21+ global $wgLocalTZoffset, $wgContLang;
2222
2323 $wgContLang = $en = Language::factory( 'en' );
2424
Index: trunk/phase3/maintenance/tests/SearchDbTest.php
@@ -3,7 +3,6 @@
44 var $db;
55
66 function setUp() {
7 - global $wgDBprefix, $wgDBtype;
87 $this->db = wfGetDB( DB_MASTER );
98 if ( !$this->db ) {
109 $this->markTestIncomplete( "Can't find a database to test with." );
Index: trunk/phase3/maintenance/tests/ApiSetup.php
@@ -7,7 +7,7 @@
88 protected static $apiUrl;
99
1010 function setup() {
11 - global $wgServerName, $wgServer, $wgContLang, $wgAuth, $wgScriptPath,
 11+ global $wgServer, $wgContLang, $wgAuth, $wgScriptPath,
1212 $wgScriptExtension, $wgMemc, $wgRequest;
1313
1414 self::$apiUrl = $wgServer . $wgScriptPath . "/api" . $wgScriptExtension;
Index: trunk/phase3/maintenance/tests/TitlePermissionTest.php
@@ -10,7 +10,7 @@
1111 static $altUserName;
1212
1313 function setUp() {
14 - global $wgAutoloadLocalClasses, $wgLocaltimezone, $wgLocalTZoffset;
 14+ global $wgLocaltimezone, $wgLocalTZoffset;
1515 self::$userName = "Useruser";
1616 self::$altUserName = "Altuseruser";
1717 date_default_timezone_set( $wgLocaltimezone );
@@ -40,7 +40,6 @@
4141 }
4242
4343 function setUserPerm( $perm ) {
44 - global $wgUseRCPatrol, $wgUseNPPatrol;
4544 if ( is_array( $perm ) ) {
4645 self::$user->mRights = $perm;
4746 } else {
Index: trunk/phase3/maintenance/tests/selenium/Selenium.php
@@ -21,7 +21,6 @@
2222 }
2323
2424 public function start() {
25 - global $wgSeleniumTestsBrowsers, $wgSeleniumTestsSeleniumHost;
2625 parent::start();
2726 $this->isStarted = true;
2827 }
Index: trunk/phase3/maintenance/tests/UploadFromUrlTest.php
@@ -8,7 +8,7 @@
99 class UploadFromUrlTest extends ApiTestSetup {
1010
1111 function setUp() {
12 - global $wgEnableUploads, $wgLocalFileRepo, $wgAllowCopyUploads;
 12+ global $wgEnableUploads, $wgAllowCopyUploads;
1313
1414 $wgEnableUploads = true;
1515 $wgAllowCopyUploads = true;
Index: trunk/phase3/includes/Article.php
@@ -2375,7 +2375,6 @@
23762376 $returnto = $rc->getAttribute( 'rc_type' ) == RC_NEW ? 'Newpages' : 'Recentchanges';
23772377 $return = SpecialPage::getTitleFor( $returnto );
23782378
2379 - $dbw = wfGetDB( DB_MASTER );
23802379 $errors = $rc->doMarkPatrolled();
23812380
23822381 if ( in_array( array( 'rcpatroldisabled' ), $errors ) ) {
Index: trunk/phase3/includes/parser/Parser_LinkHooks.php
@@ -128,7 +128,6 @@
129129 $titleRegex = "/^([{$tc}]+)$/sD";
130130 }
131131
132 - $sk = $this->mOptions->getSkin();
133132 $holders = new LinkHolderArray( $this );
134133
135134 if( is_null( $this->mTitle ) ) {
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -32,7 +32,6 @@
3333 private $stmt;
3434 private $nrows;
3535
36 - private $unique;
3736 private function array_unique_md( $array_in ) {
3837 $array_out = array();
3938 $array_hashes = array();
Index: trunk/phase3/includes/installer/CliInstaller.php
@@ -6,10 +6,6 @@
77 * @since 1.17
88 */
99 class CliInstaller extends CoreInstaller {
10 -
11 - /* The maintenance class in effect */
12 - private $maint;
13 -
1410 private $optionMap = array(
1511 'dbtype' => 'wgDBtype',
1612 'dbserver' => 'wgDBserver',
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -846,7 +846,6 @@
847847 class WebInstaller_Complete extends WebInstallerPage {
848848
849849 public function execute() {
850 - global $IP;
851850 $this->startForm();
852851 $this->addHTML(
853852 $this->parent->getInfoBox(
Index: trunk/phase3/includes/WebRequest.php
@@ -777,7 +777,6 @@
778778 class FauxRequest extends WebRequest {
779779 private $wasPosted = false;
780780 private $session = array();
781 - private $response;
782781
783782 /**
784783 * @param $data Array of *non*-urlencoded key => value pairs, the
Index: trunk/phase3/includes/media/PNG.php
@@ -50,8 +50,7 @@
5151 return (boolean) $data;
5252 }
5353 function getLongDesc( $image ) {
54 - global $wgUser, $wgLang;
55 - $sk = $wgUser->getSkin();
 54+ global $wgLang;
5655 $original = parent::getLongDesc( $image );
5756
5857 wfSuppressWarnings();
Index: trunk/phase3/includes/Title.php
@@ -27,7 +27,6 @@
2828 /** @name Static cache variables */
2929 // @{
3030 static private $titleCache = array();
31 - static private $interwikiCache = array();
3231 // @}
3332
3433 /**
@@ -3487,7 +3486,6 @@
34883487 * @return \type{\bool} TRUE or FALSE
34893488 */
34903489 public function isValidMoveTarget( $nt ) {
3491 - $dbw = wfGetDB( DB_MASTER );
34923490 # Is it an existing file?
34933491 if ( $nt->getNamespace() == NS_FILE ) {
34943492 $file = wfLocalFile( $nt );
Index: trunk/phase3/includes/extauth/vB.php
@@ -36,7 +36,7 @@
3737 * @ingroup ExternalUser
3838 */
3939 class ExternalUser_vB extends ExternalUser {
40 - private $mDb, $mRow;
 40+ private $mRow;
4141
4242 protected function initFromName( $name ) {
4343 return $this->initFromCond( array( 'username' => $name ) );

Status & tagging log