r83173 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83172‎ | r83173 | r83174 >
Date:21:40, 3 March 2011
Author:happy-melon
Status:ok (Comments)
Tags:
Comment:
Optionally disable including mediawiki.legacy (wikibits.js) module.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1788,7 +1788,11 @@
17891789 $sk = $wgUser->getSkin();
17901790
17911791 // Add base resources
1792 - $this->addModules( array( 'mediawiki.legacy.wikibits', 'mediawiki.util' ) );
 1792+ $this->addModules( 'mediawiki.util' );
 1793+ global $wgIncludeLegacyJavaScript;
 1794+ if( $wgIncludeLegacyJavaScript ){
 1795+ $this->addModules( 'mediawiki.legacy.wikibits' );
 1796+ }
17931797
17941798 // Add various resources if required
17951799 if ( $wgUseAjax ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2499,6 +2499,12 @@
25002500 */
25012501 $wgResourceLoaderMinifyJSVerticalSpace = false;
25022502
 2503+/**
 2504+ * Whether to include the mediawiki.legacy JS library (old wikibits.js), and its
 2505+ * dependencies
 2506+ */
 2507+$wgIncludeLegacyJavaScript = true;
 2508+
25032509 /** @} */ # End of resource loader settings }
25042510
25052511

Follow-up revisions

RevisionCommit summaryAuthorDate
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Comments

#Comment by Happy-melon (talk | contribs)   21:41, 3 March 2011

Tagging 1.17 because that's the only version which really needs this; hopefully by 1.18 we'll be well on the way to emptying wikibits.js and this can be set to false-by-default and then subsequently removed. Plus I was led to introduce this for use on a production wiki which will run 1.17 :D

Status & tagging log