Commit 0490a67035a3e3901986e55e4d9e23e67ecec9ea
1 parent
c26bd04f
Deal with the Root Folder having a (non-existent) parent id of 0
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3174 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/foldermanagement/Folder.inc
| ... | ... | @@ -485,7 +485,9 @@ class Folder extends KTEntity { |
| 485 | 485 | return false; |
| 486 | 486 | } |
| 487 | 487 | if (strlen($oFolder->sParentFolderIDs) > 0) { |
| 488 | - if (strlen($oFolder->sParentFolderIDs) > 1) { | |
| 488 | + if ($oFolder->iParentID == 0) { | |
| 489 | + $aPathArray = array(); | |
| 490 | + } else if (strlen($oFolder->sParentFolderIDs) > 1) { | |
| 489 | 491 | $aPathArray = explode(",",$oFolder->sParentFolderIDs); |
| 490 | 492 | } else { |
| 491 | 493 | $aPathArray = array($oFolder->sParentFolderIDs); | ... | ... |