r96912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96911‎ | r96912 | r96913 >
Date:21:44, 12 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed 1.17 compat issue
Modified paths:
  • /trunk/extensions/Survey/specials/SpecialSurvey.php (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurveyPage.php (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurveyStats.php (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialSurveys.php (modified) (history)
  • /trunk/extensions/Survey/specials/SpecialTakeSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/specials/SpecialSurveyPage.php
@@ -51,8 +51,10 @@
5252 // If the user is authorized, display the page, if not, show an error.
5353 if ( !$this->userCanExecute( $wgUser ) ) {
5454 $this->displayRestrictionError();
55 - return;
 55+ return false;
5656 }
 57+
 58+ return true;
5759 }
5860
5961 /**
Index: trunk/extensions/Survey/specials/SpecialSurveyStats.php
@@ -30,7 +30,9 @@
3131 * @param string $arg
3232 */
3333 public function execute( $subPage ) {
34 - parent::execute( $subPage );
 34+ if ( !parent::execute( $subPage ) ) {
 35+ return;
 36+ }
3537
3638 if ( is_null( $subPage ) || trim( $subPage ) === '' ) {
3739 $this->getOutput()->redirect( SpecialPage::getTitleFor( 'Surveys' )->getLocalURL() );
Index: trunk/extensions/Survey/specials/SpecialSurvey.php
@@ -30,7 +30,9 @@
3131 * @param string $arg
3232 */
3333 public function execute( $subPage ) {
34 - parent::execute( $subPage );
 34+ if ( !parent::execute( $subPage ) ) {
 35+ return;
 36+ }
3537
3638 global $wgRequest, $wgUser;
3739
Index: trunk/extensions/Survey/specials/SpecialSurveys.php
@@ -30,7 +30,9 @@
3131 * @param string $arg
3232 */
3333 public function execute( $subPage ) {
34 - parent::execute( $subPage );
 34+ if ( !parent::execute( $subPage ) ) {
 35+ return;
 36+ }
3537
3638 global $wgRequest, $wgUser;
3739
Index: trunk/extensions/Survey/specials/SpecialTakeSurvey.php
@@ -30,7 +30,9 @@
3131 * @param string $arg
3232 */
3333 public function execute( $subPage ) {
34 - parent::execute( $subPage );
 34+ if ( !parent::execute( $subPage ) ) {
 35+ return;
 36+ }
3537
3638 $survey = Survey::selectRow(
3739 array( 'enabled' ),

Status & tagging log