From 4e6d989931f00e171af3772e2b83fdfcc7b26bb4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 27 Jun 2005 00:43:44 +0000 Subject: [PATCH] * Skip sidebar entries where link text is '-' --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 35ef23b1de..71f3178e92 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -373,6 +373,8 @@ Various bugfixes, small features, and a few experimental things: * Fix paging on Special:Contributions * (bug 2541) Fix unprotect tab * (bug 1242) category list now show on edit page +* Skip sidebar entries where link text is '-' + === Caveats === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9fabd2afd6..076f0c4336 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -739,9 +739,13 @@ class SkinTemplate extends Skin { } else { if (strpos($line, '|') !== false) { // sanity check $line = explode( '|' , trim($line, '* '), 2 ); + $link = wfMsgForContent( $line[0] ); + if( $link == '-' ) { + continue; + } $bar[$heading][] = array( 'text' => wfMsg( $line[1] ), - 'href' => $this->makeInternalOrExternalUrl( wfMsgForContent( $line[0] ) ), + 'href' => $this->makeInternalOrExternalUrl( $link ), 'id' => 'n-' . $line[1], ); } else { continue; } -- 2.20.1