Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -7,12 +7,19 @@ |
8 | 8 | /** |
9 | 9 | * Constructor |
10 | 10 | */ |
11 | | - function ReplaceText() { |
12 | | - SpecialPage::SpecialPage('ReplaceText'); |
| 11 | + public function __construct() { |
| 12 | + parent::__construct('ReplaceText', 'replacetext'); |
13 | 13 | wfLoadExtensionMessages('ReplaceText'); |
14 | 14 | } |
15 | 15 | |
16 | 16 | function execute() { |
| 17 | + global $wgUser, $wgOut; |
| 18 | + |
| 19 | + if ( ! $wgUser->isAllowed('replacetext') ) { |
| 20 | + $wgOut->permissionRequired('replacetext'); |
| 21 | + return; |
| 22 | + } |
| 23 | + |
17 | 24 | $this->setHeaders(); |
18 | 25 | doSpecialReplaceText(); |
19 | 26 | } |