Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -257,20 +257,20 @@ |
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
261 | | - * Returns the action that will be executed, not necesserly the one passed |
| 261 | + * Returns the action that will be executed, not necessarily the one passed |
262 | 262 | * passed through the "action" parameter. Actions disabled in |
263 | 263 | * $wgDisabledActions will be replaced by "nosuchaction" |
264 | 264 | * |
265 | 265 | * @return String: action |
266 | 266 | */ |
267 | 267 | public function getAction() { |
268 | | - global $wgDisabledActions, $wgActions; |
| 268 | + global $wgDisabledActions; |
269 | 269 | |
270 | 270 | $request = $this->context->getRequest(); |
271 | 271 | $action = $request->getVal( 'action', 'view' ); |
272 | 272 | |
273 | 273 | // Check for disabled actions |
274 | | - if ( in_array( $action, $wgDisabledActions ) || !in_array( $action, $wgActions ) ) { |
| 274 | + if ( in_array( $action, $wgDisabledActions ) ) { |
275 | 275 | $action = 'nosuchaction'; |
276 | 276 | } elseif ( $action === 'historysubmit' ) { |
277 | 277 | // Workaround for bug #20966: inability of IE to provide an action dependent |
— | — | @@ -501,6 +501,7 @@ |
502 | 502 | break; |
503 | 503 | default: |
504 | 504 | if ( wfRunHooks( 'UnknownAction', array( $act, $article ) ) ) { |
| 505 | + $request->setVal( 'action', 'nosuchaction' ); |
505 | 506 | $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); |
506 | 507 | } |
507 | 508 | } |