Page MenuHomePhabricator

blocklogfragmentlimit.patch

Authored By
bzimport
Nov 21 2014, 10:09 PM
Size
1 KB
Referenced Files
None
Subscribers
None

blocklogfragmentlimit.patch

Index: includes/LogEventsList.php
===================================================================
--- includes/LogEventsList.php (revision 40940)
+++ includes/LogEventsList.php (working copy)
@@ -395,6 +395,7 @@
} else {
$out->addWikiMsg( 'logempty' );
}
+ return $pager->getNumRows();
}
/**
Index: includes/specials/SpecialBlockip.php
===================================================================
--- includes/specials/SpecialBlockip.php (revision 40940)
+++ includes/specials/SpecialBlockip.php (working copy)
@@ -418,8 +418,12 @@
}
function showLogFragment( $out, $title ) {
+ global $wgUser;
$out->addHtml( Xml::element( 'h2', NULL, LogPage::logName( 'block' ) ) );
- LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText() );
+ $count = LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '', 10 );
+ if($count > 10){
+ $out->addHtml( $wgUser->getSkin()->link(Title::newFromText('Special:Log/block'), wfMsg('blocklog-fulllog'), array(), array('type' => 'block', 'page' => $title->getPrefixedText()), array('known') ) );
+ }
}
/**
Index: languages/messages/MessagesEn.php
===================================================================
--- languages/messages/MessagesEn.php (revision 40940)
+++ languages/messages/MessagesEn.php (working copy)
@@ -2520,6 +2520,7 @@
'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]".
The reason given for $1\'s block is: "$2"',
'blocklogpage' => 'Block log',
+'blocklog-fulllog' => 'Full block log',
'blocklogentry' => 'blocked [[$1]] with an expiry time of $2 $3',
'blocklogtext' => 'This is a log of user blocking and unblocking actions.
Automatically blocked IP addresses are not listed.

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4417
Default Alt Text
blocklogfragmentlimit.patch (1 KB)

Event Timeline