Index: trunk/extensions/Eval/SpecialEval.class.php |
— | — | @@ -11,11 +11,16 @@ |
12 | 12 | } |
13 | 13 | |
14 | 14 | public function execute( $par ) { |
15 | | - global $wgOut, $wgRequest, $wgUseTidy; |
| 15 | + global $wgUser, $wgOut, $wgRequest, $wgUseTidy; |
16 | 16 | wfLoadExtensionMessages( 'Eval' ); |
17 | 17 | |
18 | 18 | $this->setHeaders(); |
19 | 19 | |
| 20 | + if ( !$this->userCanExecute( $wgUser ) ) { |
| 21 | + $this->displayRestrictionError(); |
| 22 | + return; |
| 23 | + } |
| 24 | + |
20 | 25 | $code = isset( $par ) ? $par : $wgRequest->getText( 'code' ); |
21 | 26 | $escape = $wgRequest->getBool( 'escape' ); |
22 | 27 | |