diff --git a/controllers/class.Login.php b/controllers/class.Login.php index 27687b96a..7ff2fee50 100644 --- a/controllers/class.Login.php +++ b/controllers/class.Login.php @@ -57,6 +57,10 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common { */ if(!$user && $settings->_enableGuestLogin && (int) $settings->_guestID) { $guestUser = $dms->getUser((int) $settings->_guestID); + if(!$guestUser) { + $this->setErrorMsg("login_error_text"); + return false; + } if(($login != $guestUser->getLogin())) { if ((!isset($pwd) || strlen($pwd)==0)) { $this->setErrorMsg("login_error_text"); diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 67a9a5d66..8ca5152af 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -90,6 +90,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { $expandFolderTree = $this->params['expandFolderTree']; $enableDropUpload = $this->params['enableDropUpload']; $maxItemsPerPage = $this->params['maxItemsPerPage']; + $showtree = $this->params['showtree']; header('Content-Type: application/javascript; charset=UTF-8'); parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); @@ -134,7 +135,8 @@ $('#loadmore').click(function(e) { }); printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', $expandFolderTree == 2, $orderby); + if($showtree == 1) + $this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', $expandFolderTree == 2, $orderby); if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) { echo "SeedDMSUpload.setUrl('../op/op.Ajax.php');";