* Follow-up r63914: SpecialPage has methods for that, use them ;)
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 18 Mar 2010 17:36:43 +0000 (17:36 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 18 Mar 2010 17:36:43 +0000 (17:36 +0000)
* Fix a case mismatch in LogEventsList.php

includes/LogEventsList.php
includes/specials/SpecialMergeHistory.php

index 37502f4..49d4dc5 100644 (file)
@@ -430,7 +430,7 @@ class LogEventsList {
                // Show unmerge link
                } else if( self::typeAction( $row, 'merge', 'merge', 'mergehistory' ) ) {
                        $revert = '(' . $this->skin->link(
-                               SpecialPage::getTitleFor( 'Mergehistory' ),
+                               SpecialPage::getTitleFor( 'MergeHistory' ),
                                $this->message['revertmerge'],
                                array(),
                                array(
index e2ed38c..6d2ea3b 100644 (file)
@@ -47,21 +47,22 @@ class SpecialMergeHistory extends SpecialPage {
        function preCacheMessages() {
                // Precache various messages
                if( !isset( $this->message ) ) {
-                       $this->message['last'] = wfMsgExt( 'last', array( 'escape') );
+                       $this->message['last'] = wfMsgExt( 'last', array( 'escape' ) );
                }
        }
 
        function execute( $par = '' ) {
                global $wgOut, $wgRequest, $wgUser;
 
-               if( !$wgUser->isAllowed( 'mergehistory' ) ) {
-                       $wgOut->permissionRequired( 'mergehistory' );
+               if( !$this->userCanExecute( $wgUser ) ) {
+                       $this->displayRestrictionError();
                        return;
                }
 
                $this->loadRequestParams( $wgRequest );
 
-               $wgOut->setPagetitle( wfMsgHtml( "mergehistory" ) );
+               $this->setHeaders();
+               $this->outputHeader();
 
                if( $this->mTargetID && $this->mDestID && $this->mAction=="submit" && $this->mMerge ) {
                        return $this->merge();