From: Krinkle Date: Sun, 5 Feb 2012 13:30:24 +0000 (+0000) Subject: [Actions] Update usage of wgDisabledActions to check wgActions instead X-Git-Tag: 1.31.0-rc.0~24930 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=6a9d564f7a0869cd45f703aa28e74903ca76fa21;p=lhc%2Fweb%2Fwiklou.git [Actions] Update usage of wgDisabledActions to check wgActions instead * Setup.php adds any values in the deprecated wgDisabledActions to wgActions in the new format. So checking wgDisabledActions is actually insufficient, not just deprecated. * Poke r86041 --- diff --git a/includes/Action.php b/includes/Action.php index a5bcb053bd..66947abe8d 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -89,20 +89,20 @@ abstract class Action { /** * Get the action that will be executed, not necessarily the one passed * passed through the "action" request parameter. Actions disabled in - * $wgDisabledActions will be replaced by "nosuchaction". + * $wgActions will be replaced by "nosuchaction". * * @since 1.19 * @param $context IContextSource * @return string: action name */ public final static function getActionName( IContextSource $context ) { - global $wgDisabledActions; + global $wgActions; $request = $context->getRequest(); $actionName = $request->getVal( 'action', 'view' ); // Check for disabled actions - if ( in_array( $actionName, $wgDisabledActions ) ) { + if ( isset( $wgActions[$actionName] ) && $wgActions[$actionName] === false ) { $actionName = 'nosuchaction'; }