Follow-up r85928: back out unrelated changes.
authorHappy-melon <happy-melon@users.mediawiki.org>
Tue, 12 Apr 2011 23:28:23 +0000 (23:28 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Tue, 12 Apr 2011 23:28:23 +0000 (23:28 +0000)
includes/Wiki.php

index 2a1c6d2..015ef2b 100644 (file)
@@ -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' );
                                }
                }