r40995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40994‎ | r40995 | r40996 >
Date:17:01, 18 September 2008
Author:brion
Status:old
Tags:
Comment:
Cleanup for r40944:
* Break up giant long incomprehensible line
* Use SpecialPage::getTitleFor() rather than Title::newFromText() so we get proper localization of special page name
* No need to pass 'block' to Special:Log twice; just put it in the query to match actual paging behavior
* HTML-escape the blocklog-fulllog message for good measure
* No need to pass 'known' option to linker -- it knows that Special: pages are good
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -422,7 +422,13 @@
423423 $out->addHtml( Xml::element( 'h2', NULL, LogPage::logName( 'block' ) ) );
424424 $count = LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '', 10 );
425425 if($count > 10){
426 - $out->addHtml( $wgUser->getSkin()->link(Title::newFromText('Special:Log/block'), wfMsg('blocklog-fulllog'), array(), array('type' => 'block', 'page' => $title->getPrefixedText()), array('known') ) );
 426+ $out->addHtml( $wgUser->getSkin()->link(
 427+ SpecialPage::getTitleFor( 'Log' ),
 428+ wfMsgHtml( 'blocklog-fulllog' ),
 429+ array(),
 430+ array(
 431+ 'type' => 'block',
 432+ 'page' => $title->getPrefixedText() ) ) );
427433 }
428434 }
429435

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40944Readding 'Full Block Log' link, after being removed for not using Linker func...soxred9302:50, 17 September 2008