Index: trunk/extensions/uniwiki/CreatePage/CreatePage_body.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | class SpecialCreatePage extends SpecialPage { |
7 | 7 | |
8 | 8 | function __construct() { |
9 | | - SpecialPage::SpecialPage( 'CreatePage' ); |
| 9 | + SpecialPage::SpecialPage( 'CreatePage', 'createpage' ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | public function execute( $params ) { |
— | — | @@ -14,6 +14,11 @@ |
15 | 15 | wfLoadExtensionMessages( 'CreatePage' ); |
16 | 16 | |
17 | 17 | $this->setHeaders(); |
| 18 | + |
| 19 | + if ( !$this->userCanExecute( $wgUser ) ) { |
| 20 | + $this->displayRestrictionError(); |
| 21 | + return; |
| 22 | + } |
18 | 23 | |
19 | 24 | $skin = $wgUser->getSkin(); |
20 | 25 | |
— | — | @@ -53,6 +58,7 @@ |
54 | 59 | // if this is just a normal GET, then output the form |
55 | 60 | |
56 | 61 | // prefill the input with the title, if it was passed along |
| 62 | + $newTitle = false; |
57 | 63 | $newTitleText = $wgRequest->getVal( "newtitle", null ); |
58 | 64 | if ( $newTitleText != null ) { |
59 | 65 | $newTitle = Title::newFromURL( $newTitleText ); |
Index: trunk/extensions/uniwiki/CreatePage/CreatePage.php |
— | — | @@ -34,6 +34,6 @@ |
35 | 35 | $wgHooks['BeforePageDisplay'][] = 'UW_CreatePage_CSS'; |
36 | 36 | function UW_CreatePage_CSS( $out ) { |
37 | 37 | global $wgScriptPath; |
38 | | - $out->addScript ( "<link rel='stylesheet' href='$wgScriptPath/extensions/uniwiki/CreatePage/style.css' />" ); |
| 38 | + $out->addStyle( "$wgScriptPath/extensions/uniwiki/CreatePage/style.css" ); |
39 | 39 | return true; |
40 | 40 | } |