mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-07 05:39:21 +00:00
check if folder for jstree is actually accesible
This commit is contained in:
parent
7d37ef3ae2
commit
760265d136
|
@ -1899,8 +1899,7 @@ $(document).ready(function() {
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
||||||
if($folderid) {
|
if($folderid && ($folder = $this->params['dms']->getFolder($folderid))) {
|
||||||
$folder = $this->params['dms']->getFolder($folderid);
|
|
||||||
if(!$partialtree) {
|
if(!$partialtree) {
|
||||||
$path = $folder->getPath();
|
$path = $folder->getPath();
|
||||||
/* Get the first folder (root folder) of path */
|
/* Get the first folder (root folder) of path */
|
||||||
|
@ -1930,8 +1929,10 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$root = $this->params['dms']->getFolder($this->params['rootfolderid']);
|
if($root = $this->params['dms']->getFolder($this->params['rootfolderid']))
|
||||||
$tree = array(array('label'=>$root->getName(), 'id'=>$root->getID(), 'load_on_demand'=>false, 'is_folder'=>true));
|
$tree = array(array('label'=>$root->getName(), 'id'=>$root->getID(), 'load_on_demand'=>false, 'is_folder'=>true));
|
||||||
|
else
|
||||||
|
$tree = array();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
var data = <?php echo json_encode($tree); ?>;
|
var data = <?php echo json_encode($tree); ?>;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user