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( 'name', 'title', 'enabled' ), |
| 37 | + array( '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( $survey ); |
| 45 | + $this->displaySurvey( $subPage ); |
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( $survey ); |
| 50 | + $this->displaySurvey( $subPage ); |
51 | 51 | } |
52 | 52 | else { |
53 | 53 | $this->showError( 'surveys-takesurvey-surveynotenabled' ); |
— | — | @@ -59,14 +59,13 @@ |
60 | 60 | * |
61 | 61 | * @since 0.1 |
62 | 62 | * |
63 | | - * @param Survey $surveyName |
| 63 | + * @param string $subPage |
64 | 64 | */ |
65 | | - protected function displaySurvey( $survey ) { |
| 65 | + protected function displaySurvey( $subPage ) { |
66 | 66 | $this->getOutput()->addWikiText( Xml::element( |
67 | 67 | 'survey', |
68 | 68 | array( |
69 | | - 'name' => $survey->getField( 'name' ), |
70 | | - 'title' => $survey->getField( 'title' ), |
| 69 | + 'name' => $subPage, |
71 | 70 | 'require-enabled' => $GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ? '0' : '1' |
72 | 71 | ), |
73 | 72 | wfMsg( 'surveys-takesurvey-loading' ) |