http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91949
Revision: 91949
Author: diebuche
Date: 2011-07-12 11:53:58 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Revert r91942, r91943 & reimplement. wgActions doesn't contain all possible
actions!
Modified Paths:
--------------
trunk/phase3/includes/Wiki.php
Modified: trunk/phase3/includes/Wiki.php
===================================================================
--- trunk/phase3/includes/Wiki.php 2011-07-12 11:51:07 UTC (rev 91948)
+++ trunk/phase3/includes/Wiki.php 2011-07-12 11:53:58 UTC (rev 91949)
@@ -257,20 +257,20 @@
}
/**
- * 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 @@
break;
default:
if ( wfRunHooks( 'UnknownAction', array( $act,
$article ) ) ) {
+ $request->setVal( 'action',
'nosuchaction' );
$output->showErrorPage( 'nosuchaction',
'nosuchactiontext' );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs