From: Leo Koppelkamm Date: Tue, 12 Jul 2011 11:53:58 +0000 (+0000) Subject: Revert r91942, r91943 & reimplement. wgActions doesn't contain all possible actions! X-Git-Tag: 1.31.0-rc.0~28914 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=0d30caf5a38c531d9dfc6629f2d073e65f8945dd;p=lhc%2Fweb%2Fwiklou.git Revert r91942, r91943 & reimplement. wgActions doesn't contain all possible actions! --- 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' ); } }