Reverted r91942,r91943,r91949,r92156 per CR
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 3 Aug 2011 22:08:24 +0000 (22:08 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 3 Aug 2011 22:08:24 +0000 (22:08 +0000)
includes/Wiki.php
includes/specials/SpecialEditWatchlist.php

index 972de31..1ba71a5 100644 (file)
@@ -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' );
                                }
                }
index 1ca21ac..832d0c7 100644 (file)
@@ -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: