From 0490a67035a3e3901986e55e4d9e23e67ecec9ea Mon Sep 17 00:00:00 2001 From: nbm Date: Fri, 14 Jan 2005 12:55:29 +0000 Subject: [PATCH] Deal with the Root Folder having a (non-existent) parent id of 0 --- lib/foldermanagement/Folder.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/foldermanagement/Folder.inc b/lib/foldermanagement/Folder.inc index af6f770..3e9bcc5 100644 --- a/lib/foldermanagement/Folder.inc +++ b/lib/foldermanagement/Folder.inc @@ -485,7 +485,9 @@ class Folder extends KTEntity { return false; } if (strlen($oFolder->sParentFolderIDs) > 0) { - if (strlen($oFolder->sParentFolderIDs) > 1) { + if ($oFolder->iParentID == 0) { + $aPathArray = array(); + } else if (strlen($oFolder->sParentFolderIDs) > 1) { $aPathArray = explode(",",$oFolder->sParentFolderIDs); } else { $aPathArray = array($oFolder->sParentFolderIDs); -- libgit2 0.21.4