More unused globals
authorSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 17:47:41 +0000 (17:47 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 17:47:41 +0000 (17:47 +0000)
17 files changed:
includes/Article.php
includes/Title.php
includes/WebRequest.php
includes/db/DatabaseOracle.php
includes/extauth/vB.php
includes/installer/CliInstaller.php
includes/installer/WebInstallerPage.php
includes/media/PNG.php
includes/parser/Parser_LinkHooks.php
maintenance/parserTests.inc
maintenance/tests/ApiSetup.php
maintenance/tests/SearchDbTest.php
maintenance/tests/TimeAdjustTest.php
maintenance/tests/TitlePermissionTest.php
maintenance/tests/UploadFromUrlTest.php
maintenance/tests/UploadFromUrlTestSuite.php
maintenance/tests/selenium/Selenium.php

index 4903a8e..fd668f2 100644 (file)
@@ -2375,7 +2375,6 @@ class Article {
                $returnto = $rc->getAttribute( 'rc_type' ) == RC_NEW ? 'Newpages' : 'Recentchanges';
                $return = SpecialPage::getTitleFor( $returnto );
 
-               $dbw = wfGetDB( DB_MASTER );
                $errors = $rc->doMarkPatrolled();
 
                if ( in_array( array( 'rcpatroldisabled' ), $errors ) ) {
index 06aa98e..cb2c554 100644 (file)
@@ -27,7 +27,6 @@ class Title {
        /** @name Static cache variables */
        // @{
        static private $titleCache = array();
-       static private $interwikiCache = array();
        // @}
 
        /**
@@ -3487,7 +3486,6 @@ class Title {
         * @return \type{\bool} TRUE or FALSE
         */
        public function isValidMoveTarget( $nt ) {
-               $dbw = wfGetDB( DB_MASTER );
                # Is it an existing file?
                if ( $nt->getNamespace() == NS_FILE ) {
                        $file = wfLocalFile( $nt );
index 5db725f..1bde4ae 100644 (file)
@@ -777,7 +777,6 @@ class WebRequest {
 class FauxRequest extends WebRequest {
        private $wasPosted = false;
        private $session = array();
-       private $response;
 
        /**
         * @param $data Array of *non*-urlencoded key => value pairs, the
index 3866b1e..b3809b0 100644 (file)
@@ -32,7 +32,6 @@ class ORAResult {
        private $stmt;
        private $nrows;
 
-       private $unique;
        private function array_unique_md( $array_in ) {
                $array_out = array();
                $array_hashes = array();
index 2352366..355a7e6 100644 (file)
@@ -36,7 +36,7 @@
  * @ingroup ExternalUser
  */
 class ExternalUser_vB extends ExternalUser {
-       private $mDb, $mRow;
+       private $mRow;
 
        protected function initFromName( $name ) {
                return $this->initFromCond( array( 'username' => $name ) );
index bbb43fb..ec968e7 100644 (file)
@@ -6,10 +6,6 @@
  * @since 1.17
  */
 class CliInstaller extends CoreInstaller {
-
-       /* The maintenance class in effect */
-       private $maint;
-
        private $optionMap = array(
                'dbtype' => 'wgDBtype',
                'dbserver' => 'wgDBserver',
index b6b0266..a630b5d 100644 (file)
@@ -846,7 +846,6 @@ class WebInstaller_Install extends WebInstallerPage {
 class WebInstaller_Complete extends WebInstallerPage {
        
        public function execute() {
-               global $IP;
                $this->startForm();
                $this->addHTML(
                        $this->parent->getInfoBox(
index 57f4dc0..21de7f2 100644 (file)
@@ -50,8 +50,7 @@ class PNGHandler extends BitmapHandler {
                return (boolean) $data;
        }
        function getLongDesc( $image ) {
-               global $wgUser, $wgLang;
-               $sk = $wgUser->getSkin();
+               global $wgLang;
                $original = parent::getLongDesc( $image );
 
                wfSuppressWarnings();
index 8b63de8..7d4b03f 100644 (file)
@@ -128,7 +128,6 @@ class Parser_LinkHooks extends Parser
                        $titleRegex = "/^([{$tc}]+)$/sD";
                }
 
-               $sk = $this->mOptions->getSkin();
                $holders = new LinkHolderArray( $this );
                
                if( is_null( $this->mTitle ) ) {
index f95cc69..3c315ed 100644 (file)
@@ -1259,7 +1259,6 @@ class DbTestPreviewer extends TestRecorder  {
         * and all that fun stuff
         */
        function start() {
-               global $wgDBtype;
                parent::start();
 
                if ( ! $this->db->tableExists( 'testrun' )
index e4c1765..7f34f11 100644 (file)
@@ -7,7 +7,7 @@ abstract class ApiTestSetup extends PHPUnit_Framework_TestCase {
        protected static $apiUrl;
 
        function setup() {
-               global $wgServerName, $wgServer, $wgContLang, $wgAuth, $wgScriptPath,
+               global $wgServer, $wgContLang, $wgAuth, $wgScriptPath,
                        $wgScriptExtension, $wgMemc, $wgRequest;
 
                self::$apiUrl = $wgServer . $wgScriptPath . "/api" . $wgScriptExtension;
index e9884b3..370b0c4 100644 (file)
@@ -3,7 +3,6 @@ class SearchDbTest extends SearchEngineTest {
        var $db;
 
        function setUp() {
-               global $wgDBprefix, $wgDBtype;
                $this->db = wfGetDB( DB_MASTER );
                if ( !$this->db  ) {
                        $this->markTestIncomplete( "Can't find a database to test with." );
index f71fc4e..820e713 100644 (file)
@@ -17,7 +17,7 @@ class TimeAdjustTest extends PHPUnit_Framework_TestCase {
 
        # Test offset usage for a given language::userAdjust
        function testUserAdjust() {
-               global $wgLocalTZoffset, $wgContLang, $wgUser;
+               global $wgLocalTZoffset, $wgContLang;
 
                $wgContLang = $en = Language::factory( 'en' );
 
index 6420266..4d34e6f 100644 (file)
@@ -10,7 +10,7 @@ class TitlePermissionTest extends PhpUnit_Framework_TestCase {
        static $altUserName;
 
        function setUp() {
-               global $wgAutoloadLocalClasses, $wgLocaltimezone, $wgLocalTZoffset;
+               global $wgLocaltimezone, $wgLocalTZoffset;
                self::$userName = "Useruser";
                self::$altUserName = "Altuseruser";
                date_default_timezone_set( $wgLocaltimezone );
@@ -40,7 +40,6 @@ class TitlePermissionTest extends PhpUnit_Framework_TestCase {
        }
 
        function setUserPerm( $perm ) {
-               global $wgUseRCPatrol, $wgUseNPPatrol;
                if ( is_array( $perm ) ) {
                        self::$user->mRights = $perm;
                } else {
index 65879c0..e72137f 100644 (file)
@@ -8,7 +8,7 @@ class nullClass {
 class UploadFromUrlTest extends ApiTestSetup {
 
        function setUp() {
-               global $wgEnableUploads, $wgLocalFileRepo, $wgAllowCopyUploads;
+               global $wgEnableUploads, $wgAllowCopyUploads;
 
                $wgEnableUploads = true;
                $wgAllowCopyUploads = true;
index 2de8eba..6dd1a25 100644 (file)
@@ -16,7 +16,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite
                   $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
                   $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
                   $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
-                  $wgNamespacesWithSubpages, $wgThumbnailScriptPath, $wgScriptPath,
+                  $wgThumbnailScriptPath, $wgScriptPath,
                   $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
 
                $wgScript = '/index.php';
@@ -45,7 +45,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite
                $messageMemc =& wfGetMessageCacheStorage();
                $parserMemc =& wfGetParserCacheStorage();
 
-               $wgContLang = new StubContLang;
+               //$wgContLang = new StubContLang;
                $wgUser = new StubUser;
                $wgLang = new StubUserLang;
                $wgOut = new StubObject( 'wgOut', 'OutputPage' );
index 7db805a..688a69f 100644 (file)
@@ -21,7 +21,6 @@ class Selenium extends Testing_Selenium {
        }
 
        public function start() {
-               global $wgSeleniumTestsBrowsers, $wgSeleniumTestsSeleniumHost;
                parent::start();
                $this->isStarted = true;
        }