r91145 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91144‎ | r91145 | r91146 >
Date:23:46, 29 June 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
bug 29650 - [SimpleSurvey] PrefStats not properly loaded (<prefswitch-survey-true> etc.)
Modified paths:
  • /trunk/extensions/SimpleSurvey/SimpleSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SimpleSurvey/SimpleSurvey.php
@@ -3,32 +3,21 @@
44 $dir = dirname( __FILE__ ) . '/';
55
66 // from prefswitch in usability initiative
7 -$prefswitchdir = dirname( dirname( __FILE__ ) ) . "/PrefSwitch";
 7+$prefswitchdir = dirname( dirname( __FILE__ ) ) . '/PrefSwitch';
88 // Horrible back for back compat with pre-r73480 installs
99 if ( !is_dir( $prefswitchdir ) ) {
10 - $prefswitchdir = dirname( dirname( __FILE__ ) ) . "/UsabilityInitiative/PrefSwitch";
 10+ $prefswitchdir = dirname( dirname( __FILE__ ) ) . '/UsabilityInitiative/PrefSwitch';
1111 }
1212
 13+require_once( $prefswitchdir . '/PrefSwitch.php' );
 14+
1315 // Use this to override the URL of ext.prefSwitch.{js,css} if needed
1416 $wgSimpleSurveyJSPath = null;
1517 $wgSimpleSurveyCSSPath = null;
1618
1719 // Adds Autoload Classes
18 -$wgAutoloadClasses = array_merge(
19 - $wgAutoloadClasses,
20 - array(
21 - 'PrefSwitchSurvey' => $prefswitchdir . '/PrefSwitch.classes.php',
22 - 'PrefSwitchSurveyField' => $prefswitchdir . '/PrefSwitch.classes.php',
23 - 'PrefSwitchSurveyFieldSelect' => $prefswitchdir . '/PrefSwitch.classes.php',
24 - 'PrefSwitchSurveyFieldRadios' => $prefswitchdir . '/PrefSwitch.classes.php',
25 - 'PrefSwitchSurveyFieldChecks' => $prefswitchdir . '/PrefSwitch.classes.php',
26 - 'PrefSwitchSurveyFieldBoolean' => $prefswitchdir . '/PrefSwitch.classes.php',
27 - 'PrefSwitchSurveyFieldDimensions' => $prefswitchdir . '/PrefSwitch.classes.php',
28 - 'PrefSwitchSurveyFieldText' => $prefswitchdir . '/PrefSwitch.classes.php',
29 - 'SimpleSurvey' => $dir . "SimpleSurvey.classes.php",
30 - 'SpecialSimpleSurvey' => $dir . 'SpecialSimpleSurvey.php',
31 - )
32 -);
 20+$wgAutoloadClasses['SimpleSurvey'] = $dir . 'SimpleSurvey.classes.php';
 21+$wgAutoloadClasses['SpecialSimpleSurvey'] = $dir . 'SpecialSimpleSurvey.php';
3322
3423 // add special pages
3524 $wgSpecialPages['SimpleSurvey'] = 'SpecialSimpleSurvey';
@@ -50,7 +39,7 @@
5140 $wgValidSurveys = array();
5241
5342 // add surveys
54 -require_once( $dir . "Surveys.php" );
 43+require_once( $dir . 'Surveys.php' );
5544
5645 // Always include the browser stuff...
5746 foreach ( $wgPrefSwitchSurveys as &$survey ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r92258MFT r90221, r90723, r91145reedy17:49, 15 July 2011
r92270MFT r91145, r90221 to 1.17wmf1 and REL1.18reedy18:33, 15 July 2011

Comments

#Comment by Krinkle (talk | contribs)   23:51, 29 June 2011

I dont know why PrefStats was included like this before. So I'm not merging just yet. But whatever, it does needs to be fixed and backported to 1.17wmf1 as this is causing all kinds of bugs.

#Comment by Krinkle (talk | contribs)   00:01, 30 June 2011

This revision has been confirmed to fix bug 29650 in trunk (localhost) and in 1.17wmf1 (prototype)

Status & tagging log