r68370 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68369‎ | r68370 | r68371 >
Date:17:47, 21 June 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Require the purge auth instead of the delete one to have a refresh tab
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php
@@ -9,7 +9,9 @@
1010 * This line must be present before any global variable is referenced.
1111 */
1212 if ( !defined( 'MEDIAWIKI' ) ) die();
 13+
1314 global $wgHooks;
 15+
1416 $wgHooks[ 'SkinTemplateTabs' ][] = 'smwfAddRefreshTab'; // basic tab addition
1517 $wgHooks[ 'SkinTemplateNavigation' ][] = 'smwfAddStructuredRefreshTab'; // structured version for "Vector"-type skins
1618
@@ -19,7 +21,7 @@
2022 */
2123 function smwfAddRefreshTab( $skin, &$content_actions ) {
2224 global $wgUser;
23 - if ( $wgUser->isAllowed( 'delete' ) ) {
 25+ if ( $wgUser->isAllowed( 'purge' ) ) {
2426 smwfLoadExtensionMessages( 'SemanticMediaWiki' );
2527 $content_actions['purge'] = array(
2628 'class' => false,
@@ -39,5 +41,4 @@
4042 smwfAddRefreshTab( $skin, $actions );
4143 $links['actions'] = $actions;
4244 return true;
43 -}
44 -
 45+}
\ No newline at end of file

Status & tagging log