aboutsummaryrefslogtreecommitdiffstats
path: root/includes/ChangesList.php
diff options
context:
space:
mode:
authorJens Frank <jeluf@users.mediawiki.org>2005-01-13 22:58:56 +0000
committerJens Frank <jeluf@users.mediawiki.org>2005-01-13 22:58:56 +0000
commitf7a8e18aef4dd69ffb7339fd3cad61b6f24c9b38 (patch)
tree9490d046525db70b21fdf50fa6de8930958f0cb1 /includes/ChangesList.php
parent3a19307da7af73afdde85a37ead91c654864a3ab (diff)
downloadmediawikicore-f7a8e18aef4dd69ffb7339fd3cad61b6f24c9b38.tar.gz
mediawikicore-f7a8e18aef4dd69ffb7339fd3cad61b6f24c9b38.zip
Show "block" link in Special:Recentchanges for logged in users, too, if
wgUserSysopBans is true.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/7043
Diffstat (limited to 'includes/ChangesList.php')
-rw-r--r--includes/ChangesList.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/ChangesList.php b/includes/ChangesList.php
index b739835751d0..fda270f15407 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 );