Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -213,13 +213,25 @@ |
214 | 214 | unset( $bar['SEARCH'] ); |
215 | 215 | unset( $bar['LANGUAGES'] ); |
216 | 216 | unset( $bar['TOOLBOX'] ); |
217 | | - $browseLinks = reset( $bar ); |
218 | 217 | |
219 | | - foreach ( $browseLinks as $link ) { |
220 | | - if ( $link['text'] != '-' ) { |
221 | | - $s .= "<a href=\"{$link['href']}\">" . |
222 | | - htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 218 | + $barnumber = 1; |
| 219 | + foreach ( $bar as $heading => $browseLinks ) { |
| 220 | + $heading_text = wfMsg ( $heading ); |
| 221 | + if ( $barnumber > 1 ) { |
| 222 | + if ( wfEmptyMsg( $heading, $heading_text ) ) { |
| 223 | + $h = $heading; |
| 224 | + } else { |
| 225 | + $h = $heading_text; |
| 226 | + } |
| 227 | + $s .= "\n<h6>" . htmlspecialchars( $h ) . "</h6>"; |
223 | 228 | } |
| 229 | + foreach ( $browseLinks as $link ) { |
| 230 | + if ( $link['text'] != '-' ) { |
| 231 | + $s .= "<a href=\"{$link['href']}\">" . |
| 232 | + htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 233 | + } |
| 234 | + } |
| 235 | + $barnumber = $barnumber + 1; |
224 | 236 | } |
225 | 237 | |
226 | 238 | if ( $wgOut->isArticle() ) { |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -118,25 +118,33 @@ |
119 | 119 | unset( $bar['SEARCH'] ); |
120 | 120 | unset( $bar['LANGUAGES'] ); |
121 | 121 | unset( $bar['TOOLBOX'] ); |
122 | | - $browseLinks = reset( $bar ); |
123 | 122 | |
124 | | - foreach ( $browseLinks as $link ) { |
125 | | - if ( $link['text'] != '-' ) { |
126 | | - $s .= "<a href=\"{$link['href']}\">" . |
127 | | - htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 123 | + $barnumber = 1; |
| 124 | + foreach ( $bar as $heading => $browseLinks ) { |
| 125 | + if ( $barnumber > 1 ) { |
| 126 | + $s .= "\n<hr class='sep' />"; |
| 127 | + } |
| 128 | + foreach ( $browseLinks as $link ) { |
| 129 | + if ( $link['text'] != '-' ) { |
| 130 | + $s .= "<a href=\"{$link['href']}\">" . |
| 131 | + htmlspecialchars( $link['text'] ) . '</a>' . $sep; |
| 132 | + } |
128 | 133 | } |
| 134 | + if ( $barnumber == 1 ) { |
| 135 | + // only show watchlist link if logged in |
| 136 | + if( $wgUser->isLoggedIn() ) { |
| 137 | + $s.= $this->getSkin()->specialLink( 'Watchlist' ) ; |
| 138 | + $s .= $sep . $this->getSkin()->linkKnown( |
| 139 | + SpecialPage::getTitleFor( 'Contributions' ), |
| 140 | + wfMsg( 'mycontris' ), |
| 141 | + array(), |
| 142 | + array( 'target' => $wgUser->getName() ) |
| 143 | + ); |
| 144 | + } |
| 145 | + } |
| 146 | + $barnumber = $barnumber + 1; |
129 | 147 | } |
130 | 148 | |
131 | | - if( $wgUser->isLoggedIn() ) { |
132 | | - $s.= $this->getSkin()->specialLink( 'Watchlist' ) ; |
133 | | - $s .= $sep . $this->getSkin()->linkKnown( |
134 | | - SpecialPage::getTitleFor( 'Contributions' ), |
135 | | - wfMsg( 'mycontris' ), |
136 | | - array(), |
137 | | - array( 'target' => $wgUser->getName() ) |
138 | | - ); |
139 | | - } |
140 | | - // only show watchlist link if logged in |
141 | 149 | $s .= "\n<hr class='sep' />"; |
142 | 150 | $articleExists = $this->getSkin()->getTitle()->getArticleId(); |
143 | 151 | if ( $wgOut->isArticle() || $action == 'edit' || $action == 'history' || $wpPreview ) { |