From b4810bf75430dd76c09fd21a08b5760c5ce74e60 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 9 Jul 2003 13:47:50 +0000 Subject: [PATCH] (#2725) added check and error message if there is no Category document field --- presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc index 186a289..d053de1 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc @@ -47,7 +47,7 @@ function displayCategoryPathLink($aCategories) { return displayCategoryLink($aCategories[0]); } else { // else the first entry is the category name, so build a little path - return displayCategoryLink("Categories") . " > " . displayCategoryLink($aCategories[0]); + return displayCategoryLink("Categories") . ($aCategories[0] ? " > " . displayCategoryLink($aCategories[0]) : ""); } } @@ -96,9 +96,12 @@ function renderCategoryResults($aResults) { $sToRender .= "\n"; } } else { - // else the first entry is the category name, so display the documents in the category - // with full paths - $sToRender .= renderDocumentList($aResults, "This category contains no documents", "You don't have access to the documents in this category"); + if (count($aResults["categories"]) > 0) { + // else the first entry is the category name, so display the documents in the category + $sToRender .= renderDocumentList($aResults, "This category contains no documents", "You don't have access to the documents in this category"); + } else { + $sToRender .= "There is no Category Document Field- contact a System Administrator."; + } } return $sToRender; } @@ -161,7 +164,6 @@ function renderDocumentTypeResults($aResults) { } } else { // else the first entry is the document type name, so display the documents in the document type - // with full paths $sToRender .= renderDocumentList($aResults, "This document type contains no documents", "You don't have access to the documents in this document type"); } return $sToRender; -- libgit2 0.21.4