From: Platonides Date: Sat, 11 Sep 2010 21:55:21 +0000 (+0000) Subject: Code cleanup: unused globals, empty statements, typos... X-Git-Tag: 1.31.0-rc.0~34988 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=52e275003abb979bd225faf1dbe16138ebc5f116;p=lhc%2Fweb%2Fwiklou.git Code cleanup: unused globals, empty statements, typos... --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index a298a48d31..b8d99b8236 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 diff --git a/includes/ResourceLoaderModule.php b/includes/ResourceLoaderModule.php index 5b679ccee2..6fb4c7876f 100644 --- a/includes/ResourceLoaderModule.php +++ b/includes/ResourceLoaderModule.php @@ -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" ); diff --git a/includes/Skin.php b/includes/Skin.php index 527e6599ba..dbce2af8f9 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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__ ); diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 6ed2ef162e..e9919755c6 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -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) * diff --git a/includes/media/PNG.php b/includes/media/PNG.php index fb912c4130..0a7fc32da3 100644 --- a/includes/media/PNG.php +++ b/includes/media/PNG.php @@ -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'] ); diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index a6fb7dfbda..cf5101712a 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -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 is whitelisted. $text = Html::rawElement( 'span', diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index 98630e9ddb..ec600c0cad 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -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' ); diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 2c90ae15dd..8af9ac4c2f 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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; }