r72241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72240‎ | r72241 | r72242 >
Date:23:32, 2 September 2010
Author:reedy
Status:ok
Tags:
Comment:
Fix fixme from r70038

Sync with PrefSwitch
Modified paths:
  • /trunk/extensions/SimpleSurvey/SimpleSurvey.php (modified) (history)
  • /trunk/extensions/SimpleSurvey/SpecialSimpleSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SimpleSurvey/SimpleSurvey.php
@@ -22,9 +22,7 @@
2323 'SpecialSimpleSurvey' => $dir . 'SpecialSimpleSurvey.php',
2424 )
2525 );
26 -unset( $prefswitchdir );
2726
28 -
2927 // add special pages
3028 $wgSpecialPages['SimpleSurvey'] = 'SpecialSimpleSurvey';
3129 $wgSpecialPageGroups['SimpleSurvey'] = 'wiki';
@@ -46,12 +44,10 @@
4745
4846 // add surveys
4947 require_once( $dir . "Surveys.php" );
50 -unset( $dir );
5148
5249 // Always include the browser stuff...
53 -foreach ( $wgPrefSwitchSurveys as $survey ) {
 50+foreach ( $wgPrefSwitchSurveys as &$survey ) {
5451 $survey['questions']['browser'] = array(
55 - 'visibility' => "hidden",
5652 'question' => 'prefswitch-survey-question-browser',
5753 'type' => 'select',
5854 'answers' => array(
@@ -59,14 +55,21 @@
6056 'ie6' => 'prefswitch-survey-answer-browser-ie6',
6157 'ie7' => 'prefswitch-survey-answer-browser-ie7',
6258 'ie8' => 'prefswitch-survey-answer-browser-ie8',
 59+ 'ie9' => 'prefswitch-survey-answer-browser-ie9',
 60+ 'ffb' => 'prefswitch-survey-answer-browser-ffb',
6361 'ff1' => 'prefswitch-survey-answer-browser-ff1',
6462 'ff2' => 'prefswitch-survey-answer-browser-ff2',
6563 'ff3' => 'prefswitch-survey-answer-browser-ff3',
6664 'cb' => 'prefswitch-survey-answer-browser-cb',
 65+ 'cd' => 'prefswitch-survey-answer-browser-cd',
6766 'c1' => 'prefswitch-survey-answer-browser-c1',
6867 'c2' => 'prefswitch-survey-answer-browser-c2',
 68+ 'c3' => 'prefswitch-survey-answer-browser-c3',
 69+ 'c4' => 'prefswitch-survey-answer-browser-c4',
 70+ 'c5' => 'prefswitch-survey-answer-browser-c5',
6971 's3' => 'prefswitch-survey-answer-browser-s3',
7072 's4' => 'prefswitch-survey-answer-browser-s4',
 73+ 's5' => 'prefswitch-survey-answer-browser-s5',
7174 'o9' => 'prefswitch-survey-answer-browser-o9',
7275 'o9.5' => 'prefswitch-survey-answer-browser-o9.5',
7376 'o10' => 'prefswitch-survey-answer-browser-o10',
@@ -75,20 +78,19 @@
7679 );
7780 $survey['questions']['os'] = array(
7881 'question' => 'prefswitch-survey-question-os',
79 - 'visibility' => "hidden",
8082 'type' => 'select',
81 - 'answers' => array(
 83+ 'answers' => array(
8284 'windows' => 'prefswitch-survey-answer-os-windows',
8385 'windowsmobile' => 'prefswitch-survey-answer-os-windowsmobile',
8486 'macos' => 'prefswitch-survey-answer-os-macos',
8587 'iphoneos' => 'prefswitch-survey-answer-os-iphoneos',
 88+ 'ios' => 'prefswitch-survey-answer-os-ios',
8689 'linux' => 'prefswitch-survey-answer-os-linux',
8790 ),
8891 'other' => 'prefswitch-survey-answer-os-other',
8992 );
9093 $survey['questions']['res'] = array(
9194 'question' => 'prefswitch-survey-question-res',
92 - 'visibility' => "hidden",
9395 'type' => 'dimensions',
9496 );
9597 }
Index: trunk/extensions/SimpleSurvey/SpecialSimpleSurvey.php
@@ -29,8 +29,9 @@
3030 if ( $this->tokenToCheck != "" &&
3131 ( $wgRequest->getVal( 'token' ) == $this->tokenToCheck ) ) {
3232 return true;
 33+ } else {
 34+ return false;
3335 }
34 - else return false;
3536 }
3637
3738 public function setToken() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70038Several bugfixesnimishg20:38, 27 July 2010

Status & tagging log