r93858 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93857‎ | r93858 | r93859 >
Date:22:08, 3 August 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Reverted r91942,r91943,r91949,r92156 per CR
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialEditWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -277,21 +277,21 @@
278278
279279 // Check for disabled actions
280280 if ( in_array( $action, $wgDisabledActions ) ) {
281 - $action = 'nosuchaction';
282 - } elseif ( $action === 'historysubmit' ) {
283 - // Workaround for bug #20966: inability of IE to provide an action dependent
284 - // on which submit button is clicked.
 281+ return 'nosuchaction';
 282+ }
 283+
 284+ // Workaround for bug #20966: inability of IE to provide an action dependent
 285+ // on which submit button is clicked.
 286+ if ( $action === 'historysubmit' ) {
285287 if ( $request->getBool( 'revisiondelete' ) ) {
286 - $action = 'revisiondelete';
 288+ return 'revisiondelete';
287289 } else {
288 - $action = 'view';
 290+ return 'view';
289291 }
290292 } elseif ( $action == 'editredlink' ) {
291 - $action = 'edit';
 293+ return 'edit';
292294 }
293295
294 - // Write back the executed action
295 - $request->setVal( 'action', $action );
296296 return $action;
297297 }
298298
@@ -512,7 +512,6 @@
513513 break;
514514 default:
515515 if ( wfRunHooks( 'UnknownAction', array( $act, $article ) ) ) {
516 - $request->setVal( 'action', 'nosuchaction' );
517516 $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
518517 }
519518 }
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php
@@ -485,9 +485,7 @@
486486 * @return int
487487 */
488488 public static function getMode( $request, $par ) {
489 - $act = $request->getVal( 'action' );
490 - $mode = ( $act == 'view' ) ? $par : $act;
491 - $mode = strtolower( $mode );
 489+ $mode = strtolower( $request->getVal( 'action', $par ) );
492490 switch( $mode ) {
493491 case 'clear':
494492 case self::EDIT_CLEAR:

Follow-up revisions

RevisionCommit summaryAuthorDate
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
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
r92156r91949 : EditWatchlist assumed that action was always empty for viewdiebuche13:01, 14 July 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   22:10, 3 August 2011

Tagging so that revdelete works in 1.18.

Status & tagging log