Get the 'action' URL parameter from $wgRequest rather than from the $action global...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 23 Apr 2009 20:07:18 +0000 (20:07 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 23 Apr 2009 20:07:18 +0000 (20:07 +0000)
includes/Skin.php

index 096227e..79cf3f3 100644 (file)
@@ -1013,10 +1013,13 @@ END;
        }
 
        function getUndeleteLink() {
-               global $wgUser, $wgContLang, $wgLang, $action;
-               if(     $wgUser->isAllowed( 'deletedhistory' ) &&
-                       ( ( $this->mTitle->getArticleId() == 0 ) || ( $action == 'history' ) ) &&
-                       ( $n = $this->mTitle->isDeleted() ) ){
+               global $wgUser, $wgContLang, $wgLang, $wgRequest;
+
+               $action = $wgRequest->getVal( 'action', 'view' );
+
+               if ( $wgUser->isAllowed( 'deletedhistory' ) &&
+                       ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) &&
+                       $n = $this->mTitle->isDeleted() ) {
                        if ( $wgUser->isAllowed( 'undelete' ) ) {
                                $msg = 'thisisdeleted';
                        } else {