From: Jens Frank Date: Thu, 13 Jan 2005 22:58:56 +0000 (+0000) Subject: Show "block" link in Special:Recentchanges for logged in users, too, if X-Git-Tag: 1.5.0alpha1~949 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=f7a8e18aef4dd69ffb7339fd3cad61b6f24c9b38;p=lhc%2Fweb%2Fwiklou.git Show "block" link in Special:Recentchanges for logged in users, too, if wgUserSysopBans is true. --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index b739835751..fda270f154 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -301,10 +301,11 @@ class ChangesList { function recentChangesLineOld( &$rc, $watched = false ) { + global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, + $wgOnlySysopsCanPatrol, $wgSysopUserBans; + $fname = 'Skin::recentChangesLineOld'; wfProfileIn( $fname ); - - global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol; static $message; if( !isset( $message ) ) { @@ -420,7 +421,7 @@ class ChangesList { } # Block link $blockLink=''; - if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) { + if ( ( $wgSysopUserBans || 0 == $rc_user ) && $wgUser->isAllowed('block') ) { $blockLinkPage = Title::makeTitle( NS_SPECIAL, 'Blockip' ); $blockLink = $this->skin->makeKnownLinkObj( $blockLinkPage, $message['blocklink'], 'ip='.$rc_user_text ); @@ -450,8 +451,8 @@ class ChangesList { } function recentChangesLineNew( &$baseRC, $watched = false ) { - global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds; - global $wgUseRCPatrol, $wgOnlySysopsCanPatrol; + global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, + $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans; static $message; if( !isset( $message ) ) { @@ -556,7 +557,7 @@ class ChangesList { $userTalkLink = $this->skin->makeLinkObj( $userTalkPage, $talkname ); global $wgDisableAnonTalk; - if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) { + if ( ( $wgSysopUserBans || 0 == $rc_user ) && $wgUser->isAllowed('block') ) { $blockPage =& Title::makeTitle( NS_SPECIAL, 'Blockip' ); $blockLink = $this->skin->makeKnownLinkObj( $blockPage, $message['blocklink'], 'ip='.$rc_user_text );