Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.init/ext.articleCreation.init.js |
— | — | @@ -0,0 +1,3 @@ |
| 2 | +(function($,mw) { |
| 3 | + |
| 4 | +})( jQuery, window.mediaWiki ); |
\ No newline at end of file |
Property changes on: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.init/ext.articleCreation.init.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 5 | + native |
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php |
— | — | @@ -38,6 +38,10 @@ |
39 | 39 | 'remoteExtPath' => 'ArticleCreationWorkflow/modules' |
40 | 40 | ); |
41 | 41 | |
| 42 | +$wgResourceModules['ext.articleCreation.init'] = $acResourceTemplate + array( |
| 43 | + 'scripts' => 'ext.articleCreation.init/ext.articleCreation.init.js', |
| 44 | +); |
| 45 | + |
42 | 46 | $wgResourceModules['ext.articleCreation.core'] = $acResourceTemplate + array ( |
43 | 47 | 'styles' => 'ext.articleCreation.core/ext.articleCreation.core.css', |
44 | 48 | 'scripts' => 'ext.articleCreation.core/ext.articleCreation.core.js', |
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.hooks.php |
— | — | @@ -41,16 +41,22 @@ |
42 | 42 | * Customized html that shows an article doesn't exist |
43 | 43 | */ |
44 | 44 | public static function BeforeDisplayNoArticleText( $article, &$text, $errors, $wgUser, &$wikiText ) { |
45 | | - global $wgGroupPermissions; |
| 45 | + // global $wgGroupPermissions; |
| 46 | + // |
| 47 | + // // Show the custom page if there is no error or the user is not loggin and anonmyous edit |
| 48 | + // // is not allowed |
| 49 | + // if ( !count( $errors ) || ( $wgUser->isAnon() && !$wgGroupPermissions['*']['edit'] ) ) { |
| 50 | + // $text = ArticleCreationTemplates::showMissingPage( $article ); |
| 51 | + // $wikiText = false; |
| 52 | + // } |
46 | 53 | |
47 | | - // Show the custom page if there is no error or the user is not loggin and anonmyous edit |
48 | | - // is not allowed |
49 | | - if ( !count( $errors ) || ( $wgUser->isAnon() && !$wgGroupPermissions['*']['edit'] ) ) { |
50 | | - $text = ArticleCreationTemplates::showMissingPage( $article ); |
51 | | - $wikiText = false; |
52 | | - } |
| 54 | + // return false; |
53 | 55 | |
54 | | - return false; |
| 56 | + global $wgOut; |
| 57 | + |
| 58 | + $wgOut->addModules( array( 'ext.articleCreation.init' ) ); |
| 59 | + |
| 60 | + return true; |
55 | 61 | } |
56 | 62 | |
57 | 63 | public static function resourceLoaderGetConfigVars( &$vars ) { |