r110719 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110718‎ | r110719 | r110720 >
Date:13:30, 5 February 2012
Author:krinkle
Status:ok
Tags:core 
Comment:
[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
Modified paths:
  • /trunk/phase3/includes/Action.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Action.php
@@ -89,20 +89,20 @@
9090 /**
9191 * Get the action that will be executed, not necessarily the one passed
9292 * passed through the "action" request parameter. Actions disabled in
93 - * $wgDisabledActions will be replaced by "nosuchaction".
 93+ * $wgActions will be replaced by "nosuchaction".
9494 *
9595 * @since 1.19
9696 * @param $context IContextSource
9797 * @return string: action name
9898 */
9999 public final static function getActionName( IContextSource $context ) {
100 - global $wgDisabledActions;
 100+ global $wgActions;
101101
102102 $request = $context->getRequest();
103103 $actionName = $request->getVal( 'action', 'view' );
104104
105105 // Check for disabled actions
106 - if ( in_array( $actionName, $wgDisabledActions ) ) {
 106+ if ( isset( $wgActions[$actionName] ) && $wgActions[$actionName] === false ) {
107107 $actionName = 'nosuchaction';
108108 }
109109

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86041r86001, now with less scariness :P I took out the delete action and did purg...happy-melon10:38, 14 April 2011

Status & tagging log