Index: trunk/extensions/SimpleSurvey/Surveys.php |
— | — | @@ -1,5 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +$wgSimpleSurveyRedirectURL = ""; |
4 | 5 | |
5 | 6 | $wgValidSurveys[] = 'vitals-07-2010'; |
6 | 7 | |
Index: trunk/extensions/SimpleSurvey/SimpleSurvey.i18n.php |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | 'simple-survey-invalid' => 'That is not a valid survey at this time', |
12 | 12 | 'simple-survey-back' => 'Go back', |
13 | 13 | 'simple-survey-title' => 'Simple Survey', |
| 14 | + 'simple-survey-confirm' => 'Thanks! Your data has been submited.', |
14 | 15 | |
15 | 16 | /*vitals 07 2010 */ |
16 | 17 | 'simple-survey-intro-vitals-07-2010' => 'This is a quick survey to give us a better idea of who you are', |
— | — | @@ -17,8 +18,8 @@ |
18 | 19 | |
19 | 20 | 'vitals-07-2010-question-use' => 'How often do you use Wikipedia?', |
20 | 21 | 'vitals-07-2010-question-edit' => 'Do you edit Wikipedia?', |
21 | | - 'vitals-07-2010-question-nonprofit' => 'Did you know Wikipedia is a non-profit?', |
22 | | - 'vitals-07-2010-question-wikimedia'=> 'Please describe your knowledge of the Wikimedia Foundation, the organization that hosts Wikipedia and its sitser projects such as Wiktionary and Wikiquote:', |
| 22 | + 'vitals-07-2010-question-nonprofit' => 'Did you know Wikipedia is a non-profit project?', |
| 23 | + 'vitals-07-2010-question-wikimedia'=> 'Which of these describes your knowledge of the Wikimedia Foundation, the organization that hosts Wikipedia and its sister projects such as Wiktionary and Wikiquote:', |
23 | 24 | 'vitals-07-2010-question-age'=> 'Please tell us your age', |
24 | 25 | 'vitals-07-2010-question-programming' => 'Please tell us which one of these describes you:', |
25 | 26 | 'vitals-07-2010-question-gender'=> 'Please tell us your gender', |
Index: trunk/extensions/SimpleSurvey/SpecialSimpleSurvey.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | |
28 | 28 | |
29 | 29 | public function execute( $par ) { |
30 | | - global $wgRequest, $wgOut, $wgUser, $wgPrefSwitchSurveys, $wgPrefSwitchStyleVersion, $wgValidSurveys; |
| 30 | + global $wgRequest, $wgOut, $wgUser, $wgPrefSwitchSurveys, $wgPrefSwitchStyleVersion, $wgValidSurveys, $wgSimpleSurveyRedirectURL; |
31 | 31 | $this->setHeaders(); |
32 | 32 | // Set page title |
33 | 33 | $wgOut->setPageTitle( wfMsg( 'simple-survey-title' ) ); |
— | — | @@ -38,6 +38,10 @@ |
39 | 39 | $wgOut->addHtml("<b>" . wfMsg( 'simple-survey-confirm' ). "</b>"); |
40 | 40 | } |
41 | 41 | //forward to new page |
| 42 | + if($wgSimpleSurveyRedirectURL){ |
| 43 | + $wgRequest->response()->header("Location: $wgSimpleSurveyRedirectURL"); |
| 44 | + } |
| 45 | + |
42 | 46 | return; |
43 | 47 | } |
44 | 48 | |