From 7dbaf6f2954bcb9d5eca2a9e0208bbde60e1404c Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 17 Oct 2007 15:38:51 +0000 Subject: [PATCH] * (bug 11690) Show revert link for page moves in Special:Log to allowed users only --- RELEASE-NOTES | 2 ++ includes/SpecialLog.php | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3bb1744cf5..ed9098054b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -105,6 +105,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11131) Change filearchive width/height columns to int for Postgres * Support plural in undeleted{revisions,revisions-files,files} * (bug 11343) If the database is read-only, ensure that undelete fails. +* (bug 11690) Show revert link for page moves in Special:Log to allowed users + only === API changes in 1.12 === diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index 09353d8156..09a49c0f51 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -370,7 +370,7 @@ class LogViewer { $revert = ''; // show revertmove link if ( !( $this->flags & self::NO_ACTION_LINK ) ) { - if ( $s->log_type == 'move' && isset( $paramArray[0] ) ) { + if ( $s->log_type == 'move' && isset( $paramArray[0] ) && $wgUser->isAllowed( 'move' ) ) { $destTitle = Title::newFromText( $paramArray[0] ); if ( $destTitle ) { $revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Movepage' ), @@ -385,7 +385,6 @@ class LogViewer { $revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Undelete' ), wfMsg( 'undeletebtn' ) , 'target='. urlencode( $title->getPrefixedDBkey() ) ) . ')'; - // show unblock link } elseif ( $s->log_action == 'block' && $wgUser->isAllowed( 'block' ) ) { $revert = '(' . $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Ipblocklist' ), @@ -525,6 +524,3 @@ class LogViewer { $out->addHTML( '

' . $html . '

' ); } } - - - -- 2.20.1