Code cleanup: unused globals, empty statements, typos...
authorPlatonides <platonides@users.mediawiki.org>
Sat, 11 Sep 2010 21:55:21 +0000 (21:55 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 11 Sep 2010 21:55:21 +0000 (21:55 +0000)
includes/OutputPage.php
includes/ResourceLoaderModule.php
includes/Skin.php
includes/installer/DatabaseUpdater.php
includes/media/PNG.php
includes/parser/DateFormatter.php
includes/parser/Preprocessor_Hash.php
includes/specials/SpecialUserlogin.php

index a298a48..b8d99b8 100644 (file)
@@ -2332,7 +2332,7 @@ class OutputPage {
         * @return String: HTML fragment
         */
        function getHeadScripts( Skin $sk ) {
-               global $wgUser, $wgRequest, $wgJsMimeType;
+               global $wgUser, $wgRequest;
                global $wgUseSiteJs;
                
                // Statup - this will immediately load jquery and mediawiki modules
index 5b679cc..6fb4c78 100644 (file)
@@ -903,7 +903,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        
        protected function getConfig( $context ) {
                global $wgLoadScript, $wgScript, $wgStylePath, $wgScriptExtension, $wgArticlePath, $wgScriptPath, $wgServer,
-                       $wgContLang, $wgBreakFrames, $wgVariantArticlePath, $wgActionPaths, $wgUseAjax, $wgAjaxWatch, $wgVersion,
+                       $wgContLang, $wgBreakFrames, $wgVariantArticlePath, $wgActionPaths, $wgUseAjax, $wgVersion,
                        $wgEnableAPI, $wgEnableWriteAPI, $wgDBname, $wgEnableMWSuggest, $wgSitename, $wgFileExtensions;
 
                // Pre-process information
@@ -963,7 +963,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
        /* Methods */
 
        public function getScript( ResourceLoaderContext $context ) {
-               global $IP, $wgStylePath, $wgLoadScript;
+               global $IP, $wgLoadScript;
 
                $scripts = file_get_contents( "$IP/resources/startup.js" );
 
index 527e659..dbce2af 100644 (file)
@@ -481,7 +481,7 @@ class Skin extends Linker {
         * @private
         */
        function setupUserCss( OutputPage $out ) {
-               global $wgRequest, $wgUser;
+               global $wgRequest;
                global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgSquidMaxage;
 
                wfProfileIn( __METHOD__ );
index 6ed2ef1..e991975 100644 (file)
@@ -237,7 +237,7 @@ abstract class DatabaseUpdater {
 
        /**
         * Get an array of updates to perform on the database. Should return a
-        * mutli-dimensional array. The main key is the MediaWiki version (1.12,
+        * multi-dimensional array. The main key is the MediaWiki version (1.12,
         * 1.13...) with the values being arrays of updates, identical to how
         * updaters.inc did it (for now)
         *
index fb912c4..0a7fc32 100644 (file)
@@ -68,7 +68,7 @@ class PNGHandler extends BitmapHandler {
                if ($metadata['loopCount'] == 0)
                        $info[] = wfMsgExt( 'file-info-png-looped', 'parseinline' );
                elseif ($metadata['loopCount'] > 1)
-                       $info[] = wfMsgExt( 'file-info-png-repeat', 'parseinline', $metadata['loopCount'] );;
+                       $info[] = wfMsgExt( 'file-info-png-repeat', 'parseinline', $metadata['loopCount'] );
                
                if ($metadata['frameCount'] > 0)
                        $info[] = wfMsgExt( 'file-info-png-frames', 'parseinline', $metadata['frameCount'] );
index a6fb7df..cf51017 100644 (file)
@@ -271,7 +271,7 @@ class DateFormatter
                        $isoBits[] = $bits['y'];
                $isoBits[] = $bits['m'];
                $isoBits[] = $bits['d'];
-               $isoDate = implode( '-', $isoBits );;
+               $isoDate = implode( '-', $isoBits );
                
                // Output is not strictly HTML (it's wikitext), but <span> is whitelisted.
                $text = Html::rawElement( 'span',
index 98630e9..ec600c0 100644 (file)
@@ -680,7 +680,7 @@ class Preprocessor_Hash implements Preprocessor {
                
                // Cache
                if ($cacheable) {
-                       $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );;
+                       $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );
                        $wgMemc->set( $cacheKey, $cacheValue, 86400 );
                        wfProfileOut( __METHOD__.'-cache-miss' );
                        wfProfileOut( __METHOD__.'-cacheable' );
index 2c90ae1..8af9ac4 100644 (file)
@@ -272,7 +272,7 @@ class LoginForm {
                # Request forgery checks.
                if ( !self::getCreateaccountToken() ) {
                        self::setCreateaccountToken();
-                       $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );;
+                       $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
                        return false;
                }