Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationTemplates.php |
— | — | @@ -7,11 +7,12 @@ |
8 | 8 | |
9 | 9 | public static function getLandingPage( $page ) { |
10 | 10 | $action = wfMessage( 'ac-action-indicator' )->escaped(); |
11 | | - |
12 | 11 | global $wgUser, $wgArticleCreationButtons; |
13 | 12 | |
| 13 | + $title = Title::newFromText( $page ); |
| 14 | + |
14 | 15 | $buttons = array(); |
15 | | - if ( $wgUser->isAnon() ) { |
| 16 | + if ( ! $title->userCan('create') || ! $title->userCan('edit') ) { |
16 | 17 | $buttons = $wgArticleCreationButtons['anonymous']; |
17 | 18 | } else { |
18 | 19 | $buttons = $wgArticleCreationButtons['logged-in']; |
Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js |
— | — | @@ -48,7 +48,8 @@ |
49 | 49 | ac.panel |
50 | 50 | .find('.ac-article-button') |
51 | 51 | .click (function () { |
52 | | - |
| 52 | + e.preventDefault(); |
| 53 | + |
53 | 54 | $('.ac-article-button') |
54 | 55 | //remove green states and hide their tooltips |
55 | 56 | .removeClass('ac-button-green') |