r96425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96424‎ | r96425 | r96426 >
Date:12:51, 7 September 2011
Author:yaron
Status:ok
Tags:
Comment:
Fixed handling for MW 1.18+ - $wgOut->getBottomScripts() now called if it exists
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php
@@ -955,9 +955,15 @@
956956 $wgTitle = SpecialPage::getTitleFor( 'Upload' );
957957
958958 if ( method_exists( $wgOut, 'addModules' ) ) {
959 - $head_scripts = '';
960959 $wgOut->addModules( array( 'mediawiki.action.edit', 'mediawiki.legacy.upload', 'mediawiki.legacy.wikibits', 'mediawiki.legacy.ajax' ) );
961 - $body_scripts = $wgOut->getHeadScripts( $sk );
 960+ // Method was added in MW 1.18
 961+ if ( method_exists( $wgOut, 'getBottomScripts' ) ) {
 962+ $head_scripts = $wgOut->getHeadScripts( $sk );
 963+ $body_scripts = $wgOut->getBottomScripts( $sk );
 964+ } else {
 965+ $head_scripts = '';
 966+ $body_scripts = $wgOut->getHeadScripts( $sk );
 967+ }
962968 } else {
963969 global $wgJsMimeType, $wgStylePath, $wgStyleVersion;
964970 $vars_js = Skin::makeGlobalVariablesScript( array( 'skinname' => $sk->getSkinName() ) );
@@ -1133,4 +1139,4 @@
11341140 }
11351141 }
11361142
1137 -}
\ No newline at end of file
 1143+}

Status & tagging log