Index: trunk/extensions/SimpleSurvey/SimpleSurvey.php |
— | — | @@ -3,32 +3,21 @@ |
4 | 4 | $dir = dirname( __FILE__ ) . '/'; |
5 | 5 | |
6 | 6 | // from prefswitch in usability initiative |
7 | | -$prefswitchdir = dirname( dirname( __FILE__ ) ) . "/PrefSwitch"; |
| 7 | +$prefswitchdir = dirname( dirname( __FILE__ ) ) . '/PrefSwitch'; |
8 | 8 | // Horrible back for back compat with pre-r73480 installs |
9 | 9 | if ( !is_dir( $prefswitchdir ) ) { |
10 | | - $prefswitchdir = dirname( dirname( __FILE__ ) ) . "/UsabilityInitiative/PrefSwitch"; |
| 10 | + $prefswitchdir = dirname( dirname( __FILE__ ) ) . '/UsabilityInitiative/PrefSwitch'; |
11 | 11 | } |
12 | 12 | |
| 13 | +require_once( $prefswitchdir . '/PrefSwitch.php' ); |
| 14 | + |
13 | 15 | // Use this to override the URL of ext.prefSwitch.{js,css} if needed |
14 | 16 | $wgSimpleSurveyJSPath = null; |
15 | 17 | $wgSimpleSurveyCSSPath = null; |
16 | 18 | |
17 | 19 | // 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'; |
33 | 22 | |
34 | 23 | // add special pages |
35 | 24 | $wgSpecialPages['SimpleSurvey'] = 'SpecialSimpleSurvey'; |
— | — | @@ -50,7 +39,7 @@ |
51 | 40 | $wgValidSurveys = array(); |
52 | 41 | |
53 | 42 | // add surveys |
54 | | -require_once( $dir . "Surveys.php" ); |
| 43 | +require_once( $dir . 'Surveys.php' ); |
55 | 44 | |
56 | 45 | // Always include the browser stuff... |
57 | 46 | foreach ( $wgPrefSwitchSurveys as &$survey ) { |