r91943 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91942‎ | r91943 | r91944 >
Date:09:58, 12 July 2011
Author:diebuche
Status:reverted (Comments)
Tags:
Comment:
r91942: Add nosuchaction also if action not in
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -270,7 +270,7 @@
271271 $action = $request->getVal( 'action', 'view' );
272272
273273 // Check for disabled actions
274 - if ( in_array( $action, $wgDisabledActions ) ) {
 274+ if ( in_array( $action, $wgDisabledActions ) || !in_array( $action, $wgActions ) ) {
275275 $action = 'nosuchaction';
276276 } elseif ( $action === 'historysubmit' ) {
277277 // Workaround for bug #20966: inability of IE to provide an action dependent

Follow-up revisions

RevisionCommit summaryAuthorDate
r91944r91943. Add global.diebuche10:19, 12 July 2011
r91949Revert r91942, r91943 & reimplement. wgActions doesn't contain all possible a...diebuche11:53, 12 July 2011
r93858Reverted r91942,r91943,r91949,r92156 per CRaaron22:08, 3 August 2011
r94446MFT to REL1_18:...hashar09:27, 14 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91942Followup r91871 per CR. Write back the actually executed action to . Ping r57415diebuche09:42, 12 July 2011

Comments

#Comment by IAlex (talk | contribs)   11:04, 12 July 2011

This is wrong:

  • action names are in the keys of $wgActions, not the values
  • not all action are listed in $wgActions, such as the ones handled in the switch of performAction() below. This would break (I intentionally use "would" because of what I said before the in_array() call always returns true) for those actions and the ones handled by the UnknownAction hook

Status & tagging log