-
- foreach ( $wgNavigationLinks as $link ) {
- $msg = wfMsgForContent( $link['href'] );
- if ( $msg != '-' ) {
- $s .= '<a href="' . $this->makeInternalOrExternalUrl( $msg ) . '">' .
- wfMsg( $link['text'] ) . '</a>' . $sep;
+
+ # Use the first heading from the Monobook sidebar as the "browse" section
+ $bar = $this->buildSidebar();
+ $browseLinks = reset( $bar );
+
+ foreach ( $browseLinks as $link ) {
+ if ( $link['text'] != '-' ) {
+ $s .= "<a href=\"{$link['href']}\">" .
+ htmlspecialchars( $link['text'] ) . '</a>' . $sep;