Index: trunk/phase3/includes/specials/SpecialSpecialpages.php |
— | — | @@ -48,19 +48,21 @@ |
49 | 49 | $groups['other'] = $other; |
50 | 50 | } |
51 | 51 | |
| 52 | + $includesRestrictedPages = false; |
52 | 53 | /** Now output the HTML */ |
53 | 54 | foreach ( $groups as $group => $sortedPages ) { |
54 | 55 | $middle = ceil( count($sortedPages)/2 ); |
55 | 56 | $total = count($sortedPages); |
56 | 57 | $count = 0; |
57 | 58 | |
58 | | - $wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" ); |
| 59 | + $wgOut->wrapWikiMsg( "<h4 class='mw-specialpagesgroup'>$1</h4>\n", "specialpages-group-$group" ); |
59 | 60 | $wgOut->addHTML( "<table style='width: 100%;' class='mw-specialpages-table'><tr>" ); |
60 | 61 | $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" ); |
61 | 62 | foreach( $sortedPages as $desc => $specialpage ) { |
62 | 63 | list( $title, $restricted ) = $specialpage; |
63 | 64 | $link = $sk->makeKnownLinkObj( $title , htmlspecialchars( $desc ) ); |
64 | 65 | if( $restricted ) { |
| 66 | + $includesRestrictedPages = true; |
65 | 67 | $wgOut->addHTML( "<li class='mw-specialpages-page mw-specialpagerestricted'>{$link}</li>\n" ); |
66 | 68 | } else { |
67 | 69 | $wgOut->addHTML( "<li>{$link}</li>\n" ); |
— | — | @@ -74,9 +76,8 @@ |
75 | 77 | } |
76 | 78 | $wgOut->addHTML( "</ul></td><td width='30%' valign='top'></td></tr></table>\n" ); |
77 | 79 | } |
78 | | - $wgOut->addHTML( |
79 | | - Xml::openElement('div', array( 'class' => 'mw-specialpages-notes' )). |
80 | | - wfMsgWikiHtml('specialpages-note'). |
81 | | - Xml::closeElement('div') |
82 | | - ); |
| 80 | + |
| 81 | + if ( $includesRestrictedPages ) { |
| 82 | + $wgOut->wrapWikiMsg( "<div class=\"mw-specialpages-notes\">\n$1\n</div>", 'specialpages-note' ); |
| 83 | + } |
83 | 84 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -112,6 +112,7 @@ |
113 | 113 | $wgForeignFileRepos |
114 | 114 | * Special:ListUsers: Sort list of usergroups by alphabet |
115 | 115 | * (bug 16762) Special:Movepage now shows a list of subpages when possible |
| 116 | +* (bug 17585) Hide legend on Special:Specialpages from non-privileged users |
116 | 117 | |
117 | 118 | === Bug fixes in 1.15 === |
118 | 119 | * (bug 16968) Special:Upload no longer throws useless warnings. |