r72208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72207‎ | r72208 | r72209 >
Date:18:38, 2 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added existance check to mediawiki.loader.go() call to prevent JS errors on client which do not end up loading the jquery and mediawiki modules.
Modified paths:
  • /branches/resourceloader/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/OutputPage.php
@@ -2367,7 +2367,7 @@
23682368 }
23692369 $scripts .= "\n" . $this->mScripts;
23702370 // This should be at the bottom of the body - below ALL other scripts
2371 - $scripts .= Html::inlineScript( 'mediaWiki.loader.go();' );
 2371+ $scripts .= Html::inlineScript( "if ( typeof mediaWiki.loader.go === 'function' ) { mediaWiki.loader.go(); }" );
23722372 return $scripts;
23732373 }
23742374

Status & tagging log