Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -148,11 +148,11 @@ |
149 | 149 | $wgOut->setSubtitle( wfMsgExt( 'difference', array( 'parseinline' ) ) ); |
150 | 150 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
151 | 151 | |
152 | | - if ( !( $this->mOldPage->userCanRead() && $this->mNewPage->userCanRead() ) ) { |
| 152 | + if ( !$this->mOldPage->userCanRead() || !$this->mNewPage->userCanRead() ) { |
153 | 153 | $wgOut->loginToUse(); |
154 | 154 | $wgOut->output(); |
155 | 155 | wfProfileOut( __METHOD__ ); |
156 | | - exit; |
| 156 | + throw new MWException("Permission Error: you do not have access to view this page"); |
157 | 157 | } |
158 | 158 | |
159 | 159 | $sk = $wgUser->getSkin(); |
— | — | @@ -423,11 +423,11 @@ |
424 | 424 | |
425 | 425 | # Check if user is allowed to look at this page. If not, bail out. |
426 | 426 | # |
427 | | - if ( !( $this->mTitle->userCanRead() ) ) { |
| 427 | + if ( !$this->mTitle->userCanRead() ) { |
428 | 428 | $wgOut->loginToUse(); |
429 | 429 | $wgOut->output(); |
430 | 430 | wfProfileOut( __METHOD__ ); |
431 | | - exit; |
| 431 | + throw new MWException("Permission Error: you do not have access to view this page"); |
432 | 432 | } |
433 | 433 | |
434 | 434 | # Prepare the header box |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -847,7 +847,7 @@ |
848 | 848 | $wgOut->loginToUse(); |
849 | 849 | $wgOut->output(); |
850 | 850 | wfProfileOut( __METHOD__ ); |
851 | | - exit; |
| 851 | + throw new MWException("Permission Error: you do not have access to view this page"); |
852 | 852 | } |
853 | 853 | |
854 | 854 | # We're looking at an old revision |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | if( !is_null( $title ) && !$title->userCanRead() ) { |
147 | 147 | $output->loginToUse(); |
148 | 148 | $output->output(); |
149 | | - exit; |
| 149 | + throw new MWException("Permission Error: you do not have access to view this page"); |
150 | 150 | } |
151 | 151 | } |
152 | 152 | |