diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 9d686bbfd..beaa916cc 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1871,7 +1871,8 @@ $(document).ready(function() { } foreach($subfolders as $subfolder) { $node = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>(1 && ($subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs))) ? true : false, 'is_folder'=>true); - if(/*$expandtree>=$level ||*/ $pathfolder->getID() == $subfolder->getID()) { + /* if the subfolder is in the path then further unfold the tree. */ + if(/*$expandtree>=$level ||*/ $path && ($path[0]->getID() == $subfolder->getID())) { $node['children'] = jqtree($path, $subfolder, $user, $accessmode, $showdocs, $expandtree, $orderby, $level+1); if($showdocs) { $documents = $subfolder->getDocuments(isset($orderby[0]) ? $orderby[0] : '', $orderdir);