r96794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96793‎ | r96794 | r96795 >
Date:16:04, 11 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
partially revert r96791; changes not needed
Modified paths:
  • /trunk/extensions/Survey/specials/SpecialTakeSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/specials/SpecialTakeSurvey.php
@@ -33,7 +33,7 @@
3434 parent::execute( $subPage );
3535
3636 $survey = Survey::selectRow(
37 - array( 'name', 'title', 'enabled' ),
 37+ array( 'enabled' ),
3838 array( 'name' => $subPage )
3939 );
4040
@@ -41,12 +41,12 @@
4242 $this->showError( 'surveys-takesurvey-nosuchsurvey' );
4343 }
4444 else if ( $survey->getField( 'enabled' ) ) {
45 - $this->displaySurvey( $survey );
 45+ $this->displaySurvey( $subPage );
4646 }
4747 else if ( $GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ) {
4848 $this->showWarning( 'surveys-takesurvey-warn-notenabled' );
4949 $this->getOutput()->addHTML( '<br /><br /><br /><br />' );
50 - $this->displaySurvey( $survey );
 50+ $this->displaySurvey( $subPage );
5151 }
5252 else {
5353 $this->showError( 'surveys-takesurvey-surveynotenabled' );
@@ -59,14 +59,13 @@
6060 *
6161 * @since 0.1
6262 *
63 - * @param Survey $surveyName
 63+ * @param string $subPage
6464 */
65 - protected function displaySurvey( $survey ) {
 65+ protected function displaySurvey( $subPage ) {
6666 $this->getOutput()->addWikiText( Xml::element(
6767 'survey',
6868 array(
69 - 'name' => $survey->getField( 'name' ),
70 - 'title' => $survey->getField( 'title' ),
 69+ 'name' => $subPage,
7170 'require-enabled' => $GLOBALS['wgUser']->isAllowed( 'surveyadmin' ) ? '0' : '1'
7271 ),
7372 wfMsg( 'surveys-takesurvey-loading' )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96791use title instead of name/id in actual surveyjeroendedauw15:55, 11 September 2011

Status & tagging log