From: X! Date: Wed, 17 Sep 2008 02:50:03 +0000 (+0000) Subject: Readding 'Full Block Log' link, after being removed for not using Linker function. X-Git-Tag: 1.31.0-rc.0~45252 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=9d74e5b71dcb42764cf02762299f2d1022dc2ba9;p=lhc%2Fweb%2Fwiklou.git Readding 'Full Block Log' link, after being removed for not using Linker function. Patch submitted by Matt Johnston, in bug 14638 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d4107053b4..c52018f26e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -207,6 +207,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 15598) Special:Newpages default limit uses user preference for recentchanges limit instead of hardcoded 50. * (bug 15617) $wgFeedClassesOutputPage::getHeadLinks() respects $wgFeedClasses, instead of hardcoding rss and atom. Patch by Juliano F. Ravasi. +* (bug 14638) Special:Blockip now provides a link to the block log if the user has been blocked more than 10 times. Patch by Matt Johnston. === API changes in 1.14 === diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 5f4fa7251c..6d264102f2 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -395,6 +395,7 @@ class LogEventsList { } else { $out->addWikiMsg( 'logempty' ); } + return $pager->getNumRows(); } /** diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 226be10dc6..a03d564a33 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -418,8 +418,12 @@ class IPBlockForm { } 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') ) ); + } } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 267f2a0451..27d80ffad9 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2520,6 +2520,7 @@ See [[Special:IPBlockList|IP block list]] to review blocks.', '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.