Commit acc307e373cf18f4802d76498cab2b75742dabd9

Authored by Neil Blakey-Milner
1 parent 69823780

Fix the '0' in collection breadcrumbs.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4798 c91229c3-7414-0410-bfa2-8a42b809f60b
browse.php
... ... @@ -334,10 +334,11 @@ class BrowseDispatcher extends KTStandardDispatcher {
334 334 $aBreadcrumbs = array();
335 335 $folder_path_names = $oFolder->getPathArray();
336 336 $folder_path_ids = explode(',', $oFolder->getParentFolderIds());
  337 + $folder_path_ids[] = $oFolder->getId();
337 338 if ($folder_path_ids[0] == 0) {
338   - $folder_path_ids = array();
  339 + array_shift($folder_path_ids);
  340 + array_shift($folder_path_names);
339 341 }
340   - $folder_path_ids[] = $oFolder->getId();
341 342  
342 343 foreach (range(0, count($folder_path_ids) - 1) as $index) {
343 344 $id = $folder_path_ids[$index];
... ...
plugins/ktcore/KTDocumentActions.php
... ... @@ -460,10 +460,11 @@ class KTDocumentMoveAction extends KTDocumentAction {
460 460 $aBreadcrumbs = array();
461 461 $folder_path_names = $this->oFolder->getPathArray();
462 462 $folder_path_ids = explode(',', $this->oFolder->getParentFolderIds());
  463 + $folder_path_ids[] = $this->oFolder->getId();
463 464 if ($folder_path_ids[0] == 0) {
464   - $folder_path_ids = array();
  465 + array_shift($folder_path_ids);
  466 + array_shift($folder_path_names);
465 467 }
466   - $folder_path_ids[] = $this->oFolder->getId();
467 468  
468 469 foreach (range(0, count($folder_path_ids) - 1) as $index) {
469 470 $id = $folder_path_ids[$index];
... ...
plugins/ktcore/admin/archivedDocuments.php
... ... @@ -70,10 +70,11 @@ class ArchivedDocumentsDispatcher extends KTAdminDispatcher {
70 70 $aBreadcrumbs = array();
71 71 $folder_path_names = $oFolder->getPathArray();
72 72 $folder_path_ids = explode(',', $oFolder->getParentFolderIds());
  73 + $folder_path_ids[] = $oFolder->getId();
73 74 if ($folder_path_ids[0] == 0) {
74   - $folder_path_ids = array();
  75 + array_shift($folder_path_ids);
  76 + array_shift($folder_path_names);
75 77 }
76   - $folder_path_ids[] = $oFolder->getId();
77 78  
78 79 foreach (range(0, count($folder_path_ids) - 1) as $index) {
79 80 $id = $folder_path_ids[$index];
... ...
plugins/ktcore/admin/unitManagement.php
... ... @@ -72,11 +72,11 @@ class KTUnitAdminDispatcher extends KTAdminDispatcher {
72 72 $aBreadcrumbs = array();
73 73 $folder_path_names = $oFolder->getPathArray();
74 74 $folder_path_ids = explode(',', $oFolder->getParentFolderIds());
  75 + $folder_path_ids[] = $oFolder->getId();
75 76 if ($folder_path_ids[0] == 0) {
76   - $folder_path_ids = array();
  77 + array_shift($folder_path_ids);
77 78 array_shift($folder_path_names);
78 79 }
79   - $folder_path_ids[] = $oFolder->getId();
80 80  
81 81 foreach (range(0, count($folder_path_ids) - 1) as $index) {
82 82 $id = $folder_path_ids[$index];
... ...