Index: trunk/extensions/Survey/specials/SpecialTakeSurvey.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | parent::execute( $subPage ); |
35 | 35 | |
36 | 36 | $survey = Survey::selectRow( |
37 | | - array( 'enabled' ), |
| 37 | + array( 'name', 'title', 'enabled' ), |
38 | 38 | array( 'name' => $subPage ) |
39 | 39 | ); |
40 | 40 | |
— | — | @@ -41,12 +41,12 @@ |
42 | 42 | $this->showError( 'surveys-takesurvey-nosuchsurvey' ); |
43 | 43 | } |
44 | 44 | else if ( $survey->getField( 'enabled' ) ) { |
45 | | - $this->displaySurvey( $subPage ); |
| 45 | + $this->displaySurvey( $survey ); |
46 | 46 | } |
47 | 47 | else if ( $GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ) { |
48 | 48 | $this->showWarning( 'surveys-takesurvey-warn-notenabled' ); |
49 | 49 | $this->getOutput()->addHTML( '<br /><br /><br /><br />' ); |
50 | | - $this->displaySurvey( $subPage ); |
| 50 | + $this->displaySurvey( $survey ); |
51 | 51 | } |
52 | 52 | else { |
53 | 53 | $this->showError( 'surveys-takesurvey-surveynotenabled' ); |
— | — | @@ -59,13 +59,14 @@ |
60 | 60 | * |
61 | 61 | * @since 0.1 |
62 | 62 | * |
63 | | - * @param string $surveyName |
| 63 | + * @param Survey $surveyName |
64 | 64 | */ |
65 | | - protected function displaySurvey( $surveyName ) { |
| 65 | + protected function displaySurvey( $survey ) { |
66 | 66 | $this->getOutput()->addWikiText( Xml::element( |
67 | 67 | 'survey', |
68 | 68 | array( |
69 | | - 'name' => $surveyName, |
| 69 | + 'name' => $survey->getField( 'name' ), |
| 70 | + 'title' => $survey->getField( 'title' ), |
70 | 71 | 'require-enabled' => $GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ? '0' : '1' |
71 | 72 | ), |
72 | 73 | wfMsg( 'surveys-takesurvey-loading' ) |
Index: trunk/extensions/Survey/includes/SurveyTag.php |
— | — | @@ -91,6 +91,7 @@ |
92 | 92 | return array( |
93 | 93 | 'id' => array( 'filter' => FILTER_VALIDATE_INT, 'options' => array( 'min_range' => 1 ) ), |
94 | 94 | 'name' => array(), |
| 95 | + 'title' => array(), |
95 | 96 | 'require-enabled' => array( 'filter' => FILTER_VALIDATE_INT, 'options' => array( 'min_range' => 0, 'max_range' => 1 ) ), |
96 | 97 | ); |
97 | 98 | } |
Index: trunk/extensions/Survey/resources/jquery.survey.js |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | this.getSurveyBody = function( surveyData ) { |
206 | 206 | $survey = $( '<div />' ); |
207 | 207 | |
208 | | - $survey.append( $( '<h1 />' ).text( surveyData.name ) ); |
| 208 | + $survey.append( $( '<h1 />' ).text( surveyData.title ) ); |
209 | 209 | |
210 | 210 | $survey.append( $( '<p />' ).text( surveyData.header ) ); |
211 | 211 | |