get root folder in printTreeNavigationJs() only if partialtree is not set

This commit is contained in:
Uwe Steinmann 2020-02-26 20:58:54 +01:00
parent 3d33c1d49c
commit 7761f5d77b

View File

@ -1846,9 +1846,9 @@ $(document).ready(function() {
$folder = $this->params['dms']->getFolder($folderid);
if(!$partialtree) {
$path = $folder->getPath();
/* Get the first folder (root folder) of path */
$folder = array_shift($path);
}
/* Get the first folder (root folder) of path */
$folder = array_shift($path);
$node = array('label'=>$folder->getName(), 'id'=>$folder->getID(), 'load_on_demand'=>false, 'is_folder'=>true);
if(!$folder->hasSubFolders()) {
$node['load_on_demand'] = true;