r40838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40837‎ | r40838 | r40839 >
Date:01:26, 15 September 2008
Author:soxred93
Status:old
Tags:
Comment:
(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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -395,6 +395,7 @@
396396 } else {
397397 $out->addWikiMsg( 'logempty' );
398398 }
 399+ return $pager->getNumRows();
399400 }
400401
401402 /**
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -419,7 +419,11 @@
420420
421421 function showLogFragment( $out, $title ) {
422422 $out->addHtml( Xml::element( 'h2', NULL, LogPage::logName( 'block' ) ) );
423 - LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText() );
 423+ $count = LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '', 10 );
 424+ if($count > 10){
 425+ $logtitle = Title::newFromText('Special:Log/block');
 426+ $out->addHtml( Xml::element( 'a', array('href' => $logtitle->getFullURL(array('type' => 'block', 'page' => $title->getPrefixedText()))), wfMsg('blocklog-header') ) );
 427+ }
424428 }
425429
426430 /**
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2518,6 +2518,7 @@
25192519 'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]".
25202520 The reason given for $1\'s block is: "$2"',
25212521 'blocklogpage' => 'Block log',
 2522+'blocklog-header' => 'Full block log',
25222523 'blocklogentry' => 'blocked [[$1]] with an expiry time of $2 $3',
25232524 'blocklogtext' => 'This is a log of user blocking and unblocking actions.
25242525 Automatically blocked IP addresses are not listed.
Index: trunk/phase3/RELEASE-NOTES
@@ -206,6 +206,7 @@
207207 even if there are broken link records with source article id 0 in the database
208208 * (bug 15598) Special:Newpages default limit uses user preference for recentchanges
209209 limit instead of hardcoded 50.
 210+* (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.
210211
211212 === API changes in 1.14 ===
212213

Follow-up revisions

RevisionCommit summaryAuthorDate
r40864Revert r40838 -- patch is very scary and builds its links bizarrelybrion18:33, 15 September 2008
r40944Readding 'Full Block Log' link, after being removed for not using Linker func...soxred9302:50, 17 September 2008
r41131(Bug 15650) Limit length of displayed deletion log while creating a new page...mattj20:25, 21 September 2008