Cleanup for r40944:
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 18 Sep 2008 17:01:36 +0000 (17:01 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 18 Sep 2008 17:01:36 +0000 (17:01 +0000)
* 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

includes/specials/SpecialBlockip.php

index 01afac1..e6931cb 100644 (file)
@@ -422,7 +422,13 @@ class IPBlockForm {
                $out->addHtml( Xml::element( 'h2', NULL, LogPage::logName( 'block' ) ) );
                $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') ) );
+                       $out->addHtml( $wgUser->getSkin()->link(
+                               SpecialPage::getTitleFor( 'Log' ),
+                               wfMsgHtml( 'blocklog-fulllog' ),
+                               array(),
+                               array(
+                                       'type' => 'block',
+                                       'page' => $title->getPrefixedText() ) ) );
                }
        }