r91942 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91941‎ | r91942 | r91943 >
Date:09:42, 12 July 2011
Author:diebuche
Status:reverted (Comments)
Tags:bug27930 
Comment:
Followup r91871 per CR. Write back the actually executed action to . Ping r57415
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -271,21 +271,21 @@
272272
273273 // Check for disabled actions
274274 if ( in_array( $action, $wgDisabledActions ) ) {
275 - return 'nosuchaction';
276 - }
277 -
278 - // Workaround for bug #20966: inability of IE to provide an action dependent
279 - // on which submit button is clicked.
280 - if ( $action === 'historysubmit' ) {
 275+ $action = 'nosuchaction';
 276+ } elseif ( $action === 'historysubmit' ) {
 277+ // Workaround for bug #20966: inability of IE to provide an action dependent
 278+ // on which submit button is clicked.
281279 if ( $request->getBool( 'revisiondelete' ) ) {
282 - return 'revisiondelete';
 280+ $action = 'revisiondelete';
283281 } else {
284 - return 'view';
 282+ $action = 'view';
285283 }
286284 } elseif ( $action == 'editredlink' ) {
287 - return 'edit';
 285+ $action = 'edit';
288286 }
289 -
 287+
 288+ // Write back the executed action
 289+ $request->setVal( 'action', $action );
290290 return $action;
291291 }
292292

Follow-up revisions

RevisionCommit summaryAuthorDate
r91943r91942: Add nosuchaction also if action not indiebuche09:58, 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
r57415(bug 20966) Use the name of the <button> element to determine which button wa...tstarling06:30, 6 October 2009
r91871Add action-* class to body. Bug 4438. Based on patch by Subfaderdiebuche10:57, 11 July 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   17:55, 12 July 2011

r91949 clears up the 'nosuchaction' for the case of unknown actions as well (through fallback after checking extensions, since we have no exhaustive whitelist). Notes on that rev about conceivable issues with modifying the request data but it looks like that should be fine for now. (Long-term consider moving the malleable 'action' value into the context objects so it can be passed around without mucking with global request state.)

Status & tagging log