Index: trunk/extensions/Survey/specials/SpecialSurveyPage.php |
— | — | @@ -51,8 +51,10 @@ |
52 | 52 | // If the user is authorized, display the page, if not, show an error. |
53 | 53 | if ( !$this->userCanExecute( $wgUser ) ) { |
54 | 54 | $this->displayRestrictionError(); |
55 | | - return; |
| 55 | + return false; |
56 | 56 | } |
| 57 | + |
| 58 | + return true; |
57 | 59 | } |
58 | 60 | |
59 | 61 | /** |
Index: trunk/extensions/Survey/specials/SpecialSurveyStats.php |
— | — | @@ -30,7 +30,9 @@ |
31 | 31 | * @param string $arg |
32 | 32 | */ |
33 | 33 | public function execute( $subPage ) { |
34 | | - parent::execute( $subPage ); |
| 34 | + if ( !parent::execute( $subPage ) ) { |
| 35 | + return; |
| 36 | + } |
35 | 37 | |
36 | 38 | if ( is_null( $subPage ) || trim( $subPage ) === '' ) { |
37 | 39 | $this->getOutput()->redirect( SpecialPage::getTitleFor( 'Surveys' )->getLocalURL() ); |
Index: trunk/extensions/Survey/specials/SpecialSurvey.php |
— | — | @@ -30,7 +30,9 @@ |
31 | 31 | * @param string $arg |
32 | 32 | */ |
33 | 33 | public function execute( $subPage ) { |
34 | | - parent::execute( $subPage ); |
| 34 | + if ( !parent::execute( $subPage ) ) { |
| 35 | + return; |
| 36 | + } |
35 | 37 | |
36 | 38 | global $wgRequest, $wgUser; |
37 | 39 | |
Index: trunk/extensions/Survey/specials/SpecialSurveys.php |
— | — | @@ -30,7 +30,9 @@ |
31 | 31 | * @param string $arg |
32 | 32 | */ |
33 | 33 | public function execute( $subPage ) { |
34 | | - parent::execute( $subPage ); |
| 34 | + if ( !parent::execute( $subPage ) ) { |
| 35 | + return; |
| 36 | + } |
35 | 37 | |
36 | 38 | global $wgRequest, $wgUser; |
37 | 39 | |
Index: trunk/extensions/Survey/specials/SpecialTakeSurvey.php |
— | — | @@ -30,7 +30,9 @@ |
31 | 31 | * @param string $arg |
32 | 32 | */ |
33 | 33 | public function execute( $subPage ) { |
34 | | - parent::execute( $subPage ); |
| 34 | + if ( !parent::execute( $subPage ) ) { |
| 35 | + return; |
| 36 | + } |
35 | 37 | |
36 | 38 | $survey = Survey::selectRow( |
37 | 39 | array( 'enabled' ), |