- $bar = $this->buildSidebar();
- $browseLinks = reset( $bar );
-
- foreach ( $browseLinks as $link ) {
- if ( $link['text'] != '-' ) {
- $s .= "<a href=\"{$link['href']}\">" .
- htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+ $bar = $this->getSkin()->buildSidebar();
+ unset( $bar['SEARCH'] );
+ unset( $bar['LANGUAGES'] );
+ unset( $bar['TOOLBOX'] );
+
+ $barnumber = 1;
+ foreach ( $bar as $browseLinks ) {
+ if ( is_array( $browseLinks ) ) {
+ if ( $barnumber > 1 ) {
+ $s .= "\n<hr class='sep' />";
+ }
+ foreach ( $browseLinks as $link ) {
+ if ( $link['text'] != '-' ) {
+ $s .= "<a href=\"{$link['href']}\">" .
+ htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+ }
+ }
+ }
+ if ( $barnumber == 1 ) {
+ // only show watchlist link if logged in
+ if( $this->data['loggedin'] ) {
+ $s.= Linker::specialLink( 'Watchlist' ) ;
+ $s .= $sep . Linker::linkKnown(
+ SpecialPage::getTitleFor( 'Contributions' ),
+ wfMsg( 'mycontris' ),
+ array(),
+ array( 'target' => $this->data['username'] )
+ );
+ }