From 5a57974460dbcfd66d6765cf3c92696c5ccd98cb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 12 Dec 2022 19:03:25 +0100 Subject: [PATCH] fix getting homefolder --- class.paperless.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class.paperless.php b/class.paperless.php index 913158e..5d06469 100644 --- a/class.paperless.php +++ b/class.paperless.php @@ -187,7 +187,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */ } if(!empty($settings->_extensions['paperless']['usehomefolder'])) { - if(!($startfolder = $userobj->getHomeFolder())) + if(!($startfolder = $dms->getFolder((int) $userobj->getHomeFolder()))) $startfolder = $dms->getFolder($settings->_rootFolderID); } elseif(!isset($settings->_extensions['paperless']['rootfolder']) || !($startfolder = $dms->getFolder($settings->_extensions['paperless']['rootfolder']))) $startfolder = $dms->getFolder($settings->_rootFolderID); @@ -258,7 +258,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */ $logger->log(var_export($params, true), PEAR_LOG_INFO); if(!empty($settings->_extensions['paperless']['usehomefolder'])) { - if(!($startfolder = $userobj->getHomeFolder())) + if(!($startfolder = $dms->getFolder((int) $userobj->getHomeFolder()))) $startfolder = $dms->getFolder($settings->_rootFolderID); } elseif(!isset($settings->_extensions['paperless']['rootfolder']) || !($startfolder = $dms->getFolder($settings->_extensions['paperless']['rootfolder']))) $startfolder = $dms->getFolder($settings->_rootFolderID); @@ -594,7 +594,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */ $notifier = $this->container->notifier; if(!empty($settings->_extensions['paperless']['usehomefolder'])) { - if(!($mfolder = $userobj->getHomeFolder())) + if(!($mfolder = $dms->getFolder((int) $userobj->getHomeFolder()))) $mfolder = $dms->getFolder($settings->_rootFolderID); } elseif(!isset($settings->_extensions['paperless']['rootfolder']) || !($mfolder = $dms->getFolder($settings->_extensions['paperless']['rootfolder']))) $mfolder = $dms->getFolder($settings->_rootFolderID);