From 2d93c5c8af37d4e7a3110caf0fefab18a268b538 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 3 Aug 2011 22:08:24 +0000 Subject: [PATCH] Reverted r91942,r91943,r91949,r92156 per CR --- includes/Wiki.php | 19 +++++++++---------- includes/specials/SpecialEditWatchlist.php | 4 +--- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 972de31e16..1ba71a5f7a 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -277,21 +277,21 @@ class MediaWiki { // Check for disabled actions if ( in_array( $action, $wgDisabledActions ) ) { - $action = 'nosuchaction'; - } elseif ( $action === 'historysubmit' ) { - // Workaround for bug #20966: inability of IE to provide an action dependent - // on which submit button is clicked. + return 'nosuchaction'; + } + + // Workaround for bug #20966: inability of IE to provide an action dependent + // on which submit button is clicked. + if ( $action === 'historysubmit' ) { if ( $request->getBool( 'revisiondelete' ) ) { - $action = 'revisiondelete'; + return 'revisiondelete'; } else { - $action = 'view'; + return 'view'; } } elseif ( $action == 'editredlink' ) { - $action = 'edit'; + return 'edit'; } - // Write back the executed action - $request->setVal( 'action', $action ); return $action; } @@ -512,7 +512,6 @@ class MediaWiki { break; default: if ( wfRunHooks( 'UnknownAction', array( $act, $article ) ) ) { - $request->setVal( 'action', 'nosuchaction' ); $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); } } diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index 1ca21ace7f..832d0c73b1 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -485,9 +485,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * @return int */ public static function getMode( $request, $par ) { - $act = $request->getVal( 'action' ); - $mode = ( $act == 'view' ) ? $par : $act; - $mode = strtolower( $mode ); + $mode = strtolower( $request->getVal( 'action', $par ) ); switch( $mode ) { case 'clear': case self::EDIT_CLEAR: -- 2.20.1