diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
commit | 72e90545454c0e014318fa3c81658e035aac58c1 (patch) | |
tree | 9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/specials/SpecialSpecialpages.php | |
parent | 565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff) |
applying patch to version 1.15.0
Diffstat (limited to 'includes/specials/SpecialSpecialpages.php')
-rw-r--r-- | includes/specials/SpecialSpecialpages.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index 560ba445..4959f107 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -48,19 +48,21 @@ function wfSpecialSpecialpages() { $groups['other'] = $other; } + $includesRestrictedPages = false; /** Now output the HTML */ foreach ( $groups as $group => $sortedPages ) { $middle = ceil( count($sortedPages)/2 ); $total = count($sortedPages); $count = 0; - $wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" ); + $wgOut->wrapWikiMsg( "<h4 class='mw-specialpagesgroup'>$1</h4>\n", "specialpages-group-$group" ); $wgOut->addHTML( "<table style='width: 100%;' class='mw-specialpages-table'><tr>" ); $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" ); foreach( $sortedPages as $desc => $specialpage ) { list( $title, $restricted ) = $specialpage; $link = $sk->makeKnownLinkObj( $title , htmlspecialchars( $desc ) ); if( $restricted ) { + $includesRestrictedPages = true; $wgOut->addHTML( "<li class='mw-specialpages-page mw-specialpagerestricted'>{$link}</li>\n" ); } else { $wgOut->addHTML( "<li>{$link}</li>\n" ); @@ -74,9 +76,8 @@ function wfSpecialSpecialpages() { } $wgOut->addHTML( "</ul></td><td width='30%' valign='top'></td></tr></table>\n" ); } - $wgOut->addHTML( - Xml::openElement('div', array( 'class' => 'mw-specialpages-notes' )). - wfMsgWikiHtml('specialpages-note'). - Xml::closeElement('div') - ); + + if ( $includesRestrictedPages ) { + $wgOut->wrapWikiMsg( "<div class=\"mw-specialpages-notes\">\n$1\n</div>", 'specialpages-note' ); + } } |