check if root folder is accessible

This commit is contained in:
Uwe Steinmann 2020-12-18 10:20:46 +01:00
parent 760265d136
commit 28bbff0cc7

View File

@ -45,7 +45,8 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
$orderby = $this->params['orderby'];
header('Content-Type: application/javascript');
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 1, $form, '', $orderby);
if($folder)
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 1, $form, '', $orderby);
} /* }}} */
function show() { /* {{{ */
@ -58,8 +59,10 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
// $this->htmlStartPage(getMLText("choose_target_document"));
// $this->contentContainerStart();
// $this->printNewTreeNavigationHtml($folder->getID(), M_READ, 1, $form);
$this->printNewTreeNavigationHtml($folder->getID(), M_READ, 1, $form, 0, $orderby);
echo '<script src="../out/out.DocumentChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
if($folder) {
$this->printNewTreeNavigationHtml($folder->getID(), M_READ, 1, $form, 0, $orderby);
echo '<script src="../out/out.DocumentChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
}
// $this->contentContainerEnd();
// $this->htmlEndPage(true);
} /* }}} */