From e207945f32b0592583a80b88b5d346d57d0f8e97 Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Tue, 12 Apr 2011 23:28:23 +0000 Subject: [PATCH] Follow-up r85928: back out unrelated changes. --- includes/Wiki.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 2a1c6d26f7..015ef2b730 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -469,16 +469,9 @@ class MediaWiki { return; } - $act = $this->getAction(); + $action = $this->getAction(); - $action = Action::factory( $this->getAction(), $article ); - if( $action instanceof Action ){ - $action->execute(); - wfProfileOut( __METHOD__ ); - return; - } - - switch( $act ) { + switch( $action ) { case 'view': $this->context->output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) ); $article->view(); @@ -501,7 +494,7 @@ class MediaWiki { case 'render': case 'deletetrackback': case 'purge': - $article->$act(); + $article->$action(); break; case 'print': $article->view(); @@ -522,6 +515,9 @@ class MediaWiki { $rdf->show(); } break; + case 'credits': + Credits::showPage( $article ); + break; case 'submit': if ( session_id() == '' ) { // Send a cookie so anons get talk message notifications @@ -534,7 +530,7 @@ class MediaWiki { $external = $this->context->request->getVal( 'externaledit' ); $section = $this->context->request->getVal( 'section' ); $oldid = $this->context->request->getVal( 'oldid' ); - if ( !$this->getVal( 'UseExternalEditor' ) || $act == 'submit' || $internal || + if ( !$this->getVal( 'UseExternalEditor' ) || $action == 'submit' || $internal || $section || $oldid || ( !$this->context->user->getOption( 'externaleditor' ) && !$external ) ) { $editor = new EditPage( $article ); $editor->submit(); @@ -563,7 +559,7 @@ class MediaWiki { $special->execute( '' ); break; default: - if ( wfRunHooks( 'UnknownAction', array( $act, $article ) ) ) { + if ( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) { $this->context->output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); } } -- 2.20.1