r52564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52563‎ | r52564 | r52565 >
Date:19:00, 29 June 2009
Author:tparscal
Status:reverted (Comments)
Tags:
Comment:
Made modules configurable.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.php
@@ -22,6 +22,19 @@
2323 // Set this to true to simply override the stock toolbar for everyone
2424 $wgUsabilityInitiativeCoesxistWithMvEmbed = false;
2525
 26+// Configures which modules should be enabled
 27+if (
 28+ !isset( $wgUsabilityInitiativeModules ) ||
 29+ !is_array( $wgUsabilityInitiativeModules )
 30+) {
 31+ $wgUsabilityInitiativeModules = array(
 32+ 'EditToolbar',
 33+ 'EditWarning',
 34+ 'PrefStats',
 35+ 'OptIn'
 36+ );
 37+}
 38+
2639 /* Setup */
2740
2841 // Sets Credits
@@ -42,11 +55,10 @@
4356 $wgExtensionMessagesFiles['UsabilityInitiative'] =
4457 dirname( __FILE__ ) . "/UsabilityInitiative.i18n.php";
4558
46 -// Includes sub-extensions
47 -require_once( dirname( __FILE__ ) . "/EditToolbar/EditToolbar.php" );
48 -require_once( dirname( __FILE__ ) . "/EditWarning/EditWarning.php" );
49 -require_once( dirname( __FILE__ ) . "/PrefStats/PrefStats.php" );
50 -require_once( dirname( __FILE__ ) . "/OptIn/OptIn.php" );
 59+// Includes modules
 60+foreach ( $wgUsabilityInitiativeModules as $module ) {
 61+ require_once( dirname( __FILE__ ) . "/{$module}/{$module}.php" );
 62+}
5163
5264 // Registers Hooks
5365 $wgHooks['AjaxAddScript'][] = 'UsabilityInitiativeHooks::addJs';

Follow-up revisions

RevisionCommit summaryAuthorDate
r53045Revert r52564, arbitrary script inclusion vulnerability.tstarling12:16, 10 July 2009

Comments

#Comment by Tim Starling (talk | contribs)   12:17, 10 July 2009

Reverted. Please read Security for developers, particularly the section on register_globals.

Status & tagging log