r72834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72833‎ | r72834 | r72835 >
Date:21:55, 11 September 2010
Author:platonides
Status:ok
Tags:
Comment:
Code cleanup: unused globals, empty statements, typos...
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/ResourceLoaderModule.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /trunk/phase3/includes/media/PNG.php (modified) (history)
  • /trunk/phase3/includes/parser/DateFormatter.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_Hash.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -481,7 +481,7 @@
482482 * @private
483483 */
484484 function setupUserCss( OutputPage $out ) {
485 - global $wgRequest, $wgUser;
 485+ global $wgRequest;
486486 global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgSquidMaxage;
487487
488488 wfProfileIn( __METHOD__ );
Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -237,7 +237,7 @@
238238
239239 /**
240240 * Get an array of updates to perform on the database. Should return a
241 - * mutli-dimensional array. The main key is the MediaWiki version (1.12,
 241+ * multi-dimensional array. The main key is the MediaWiki version (1.12,
242242 * 1.13...) with the values being arrays of updates, identical to how
243243 * updaters.inc did it (for now)
244244 *
Index: trunk/phase3/includes/ResourceLoaderModule.php
@@ -903,7 +903,7 @@
904904
905905 protected function getConfig( $context ) {
906906 global $wgLoadScript, $wgScript, $wgStylePath, $wgScriptExtension, $wgArticlePath, $wgScriptPath, $wgServer,
907 - $wgContLang, $wgBreakFrames, $wgVariantArticlePath, $wgActionPaths, $wgUseAjax, $wgAjaxWatch, $wgVersion,
 907+ $wgContLang, $wgBreakFrames, $wgVariantArticlePath, $wgActionPaths, $wgUseAjax, $wgVersion,
908908 $wgEnableAPI, $wgEnableWriteAPI, $wgDBname, $wgEnableMWSuggest, $wgSitename, $wgFileExtensions;
909909
910910 // Pre-process information
@@ -963,7 +963,7 @@
964964 /* Methods */
965965
966966 public function getScript( ResourceLoaderContext $context ) {
967 - global $IP, $wgStylePath, $wgLoadScript;
 967+ global $IP, $wgLoadScript;
968968
969969 $scripts = file_get_contents( "$IP/resources/startup.js" );
970970
Index: trunk/phase3/includes/media/PNG.php
@@ -68,7 +68,7 @@
6969 if ($metadata['loopCount'] == 0)
7070 $info[] = wfMsgExt( 'file-info-png-looped', 'parseinline' );
7171 elseif ($metadata['loopCount'] > 1)
72 - $info[] = wfMsgExt( 'file-info-png-repeat', 'parseinline', $metadata['loopCount'] );;
 72+ $info[] = wfMsgExt( 'file-info-png-repeat', 'parseinline', $metadata['loopCount'] );
7373
7474 if ($metadata['frameCount'] > 0)
7575 $info[] = wfMsgExt( 'file-info-png-frames', 'parseinline', $metadata['frameCount'] );
Index: trunk/phase3/includes/parser/Preprocessor_Hash.php
@@ -680,7 +680,7 @@
681681
682682 // Cache
683683 if ($cacheable) {
684 - $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );;
 684+ $cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );
685685 $wgMemc->set( $cacheKey, $cacheValue, 86400 );
686686 wfProfileOut( __METHOD__.'-cache-miss' );
687687 wfProfileOut( __METHOD__.'-cacheable' );
Index: trunk/phase3/includes/parser/DateFormatter.php
@@ -271,7 +271,7 @@
272272 $isoBits[] = $bits['y'];
273273 $isoBits[] = $bits['m'];
274274 $isoBits[] = $bits['d'];
275 - $isoDate = implode( '-', $isoBits );;
 275+ $isoDate = implode( '-', $isoBits );
276276
277277 // Output is not strictly HTML (it's wikitext), but <span> is whitelisted.
278278 $text = Html::rawElement( 'span',
Index: trunk/phase3/includes/OutputPage.php
@@ -2332,7 +2332,7 @@
23332333 * @return String: HTML fragment
23342334 */
23352335 function getHeadScripts( Skin $sk ) {
2336 - global $wgUser, $wgRequest, $wgJsMimeType;
 2336+ global $wgUser, $wgRequest;
23372337 global $wgUseSiteJs;
23382338
23392339 // Statup - this will immediately load jquery and mediawiki modules
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -272,7 +272,7 @@
273273 # Request forgery checks.
274274 if ( !self::getCreateaccountToken() ) {
275275 self::setCreateaccountToken();
276 - $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );;
 276+ $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );
277277 return false;
278278 }
279279

Status & tagging log