r111492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111491‎ | r111492 | r111493 >
Date:21:24, 14 February 2012
Author:bsitu
Status:ok
Tags:
Comment:
Only add the javascript module if user is able to create and edit the title
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.hooks.php
@@ -84,7 +84,8 @@
8585 public static function SpecialSearchCreateLink( $title, &$params ) {
8686 global $wgOut, $wgHooks;
8787
88 - if ( ArticleCreationUtil::isEnabled() ) {
 88+ if ( ArticleCreationUtil::isEnabled() && $title->userCan( 'create' ) &&
 89+ $title->userCan('edit') ) {
8990 $wgHooks['MakeGlobalVariablesScript'][] = 'ArticleCreationHooks::configSearchTitle';
9091 $wgOut->addModules( array( 'ext.articleCreation.searchResult' ) );
9192 }

Status & tagging log