From 991c975fd0cca2a56d3f8d4340f14f26dc9ef94c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 18 Mar 2010 17:36:43 +0000 Subject: [PATCH] * Follow-up r63914: SpecialPage has methods for that, use them ;) * Fix a case mismatch in LogEventsList.php --- includes/LogEventsList.php | 2 +- includes/specials/SpecialMergeHistory.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 37502f43f5..49d4dc58f6 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -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( diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index e2ed38c3e4..6d2ea3b988 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -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(); -- 2.20.1