From 6a9d564f7a0869cd45f703aa28e74903ca76fa21 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Sun, 5 Feb 2012 13:30:24 +0000 Subject: [PATCH] [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 --- includes/Action.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'; } -- 2.20.1