r63916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63915‎ | r63916 | r63917 >
Date:17:36, 18 March 2010
Author:ialex
Status:ok
Tags:
Comment:
* Follow-up r63914: SpecialPage has methods for that, use them ;)
* Fix a case mismatch in LogEventsList.php
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -430,7 +430,7 @@
431431 // Show unmerge link
432432 } else if( self::typeAction( $row, 'merge', 'merge', 'mergehistory' ) ) {
433433 $revert = '(' . $this->skin->link(
434 - SpecialPage::getTitleFor( 'Mergehistory' ),
 434+ SpecialPage::getTitleFor( 'MergeHistory' ),
435435 $this->message['revertmerge'],
436436 array(),
437437 array(
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -47,21 +47,22 @@
4848 function preCacheMessages() {
4949 // Precache various messages
5050 if( !isset( $this->message ) ) {
51 - $this->message['last'] = wfMsgExt( 'last', array( 'escape') );
 51+ $this->message['last'] = wfMsgExt( 'last', array( 'escape' ) );
5252 }
5353 }
5454
5555 function execute( $par = '' ) {
5656 global $wgOut, $wgRequest, $wgUser;
5757
58 - if( !$wgUser->isAllowed( 'mergehistory' ) ) {
59 - $wgOut->permissionRequired( 'mergehistory' );
 58+ if( !$this->userCanExecute( $wgUser ) ) {
 59+ $this->displayRestrictionError();
6060 return;
6161 }
6262
6363 $this->loadRequestParams( $wgRequest );
6464
65 - $wgOut->setPagetitle( wfMsgHtml( "mergehistory" ) );
 65+ $this->setHeaders();
 66+ $this->outputHeader();
6667
6768 if( $this->mTargetID && $this->mDestID && $this->mAction=="submit" && $this->mMerge ) {
6869 return $this->merge();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63914Refactor MergeHistory to subclass SpecialPage. Ohai unloved code :)demon16:41, 18 March 2010

Status & tagging log