From 0d30caf5a38c531d9dfc6629f2d073e65f8945dd Mon Sep 17 00:00:00 2001 From: Leo Koppelkamm Date: Tue, 12 Jul 2011 11:53:58 +0000 Subject: [PATCH] Revert r91942, r91943 & reimplement. wgActions doesn't contain all possible actions! --- includes/Wiki.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index b096d15b7a..99c7aca01e 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -257,20 +257,20 @@ class MediaWiki { } /** - * Returns the action that will be executed, not necesserly the one passed + * Returns the action that will be executed, not necessarily the one passed * passed through the "action" parameter. Actions disabled in * $wgDisabledActions will be replaced by "nosuchaction" * * @return String: action */ public function getAction() { - global $wgDisabledActions, $wgActions; + global $wgDisabledActions; $request = $this->context->getRequest(); $action = $request->getVal( 'action', 'view' ); // Check for disabled actions - if ( in_array( $action, $wgDisabledActions ) || !in_array( $action, $wgActions ) ) { + if ( in_array( $action, $wgDisabledActions ) ) { $action = 'nosuchaction'; } elseif ( $action === 'historysubmit' ) { // Workaround for bug #20966: inability of IE to provide an action dependent @@ -501,6 +501,7 @@ class MediaWiki { break; default: if ( wfRunHooks( 'UnknownAction', array( $act, $article ) ) ) { + $request->setVal( 'action', 'nosuchaction' ); $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); } } -- 2.20.1