From 2d3e88ba596fc217255d4358ae345a4e44ec63ed Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 11 Mar 2003 09:12:19 +0000 Subject: [PATCH] don't display blank categories --- presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc index ca13e27..47e85a5 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc @@ -68,11 +68,15 @@ function displayCategoryPathLink($aCategories) { * @param string the category name to display */ function displayCategoryLink($sCategoryName) { - return generateLink($_SERVER["PHP_SELF"], - "fBrowseType=category" . - // if the category title is passed in, link back to the list of categories - (($sCategoryName == "Categories") ? "" : "&fCategoryName=" . urlencode($sCategoryName)), - $sCategoryName); + if ($sCategoryName != "") { + return generateLink($_SERVER["PHP_SELF"], + "fBrowseType=category" . + // if the category title is passed in, link back to the list of categories + (($sCategoryName == "Categories") ? "" : "&fCategoryName=" . urlencode($sCategoryName)), + $sCategoryName); + } else { + return false; + } } function renderCategoryResults($aResults) { @@ -82,7 +86,7 @@ function renderCategoryResults($aResults) { if ($aResults["categories"][0] == "Categories") { // loop through categories and display them for ($i=1; $i" . displayCategoryLink($aResults["categories"][$i]) . ""; + $sToRender .= "" . displayCategoryLink($aResults["categories"][$i]) . "\n"; } } else { // else the first entry is the category name, so display the documents in the category -- libgit2 0.21.4