From dfe2e3f1671cfe161ee18a70e4602547cfe4ae19 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 06:41:51 +0200 Subject: [PATCH 1/8] add new option for configuring replacement of documents in webdav --- conf/settings.xml.template | 3 +++ inc/inc.ClassSettings.php | 13 +++++++++++++ op/op.Settings.php | 3 +++ views/bootstrap/class.Settings.php | 9 +++++++++ 4 files changed, 28 insertions(+) diff --git a/conf/settings.xml.template b/conf/settings.xml.template index ea35e3c2f..452c847fe 100644 --- a/conf/settings.xml.template +++ b/conf/settings.xml.template @@ -71,6 +71,9 @@ calendarDefaultView = "y" firstDayOfWeek = "0" /> + + + "> + : + _enableWebdavReplaceDoc) echo "checked" ?> /> + + From 0b4b3fb9d95229229362e09f83b48d2beb9d2e7e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 06:46:35 +0200 Subject: [PATCH 2/8] check if xml node in configuration exists before accessing it --- inc/inc.ClassSettings.php | 176 +++++++++++++++++++++----------------- 1 file changed, 96 insertions(+), 80 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 55b52c6f5..ce15f283d 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -476,51 +476,57 @@ class Settings { /* {{{ */ // XML Path: /configuration/site/calendar $node = $xml->xpath('/configuration/site/calendar'); - $tab = $node[0]->attributes(); - $this->_enableCalendar = Settings::boolVal($tab["enableCalendar"]); - $this->_calendarDefaultView = strval($tab["calendarDefaultView"]); - $this->_firstDayOfWeek = intval($tab["firstDayOfWeek"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_enableCalendar = Settings::boolVal($tab["enableCalendar"]); + $this->_calendarDefaultView = strval($tab["calendarDefaultView"]); + $this->_firstDayOfWeek = intval($tab["firstDayOfWeek"]); + } // XML Path: /configuration/system/server $node = $xml->xpath('/configuration/system/server'); - $tab = $node[0]->attributes(); - $this->_rootDir = strval($tab["rootDir"]); - $this->_httpRoot = strval($tab["httpRoot"]); - $this->_contentDir = strval($tab["contentDir"]); - if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR) - $this->_contentDir .= DIRECTORY_SEPARATOR; - $this->_cacheDir = strval($tab["cacheDir"]); - $this->_stagingDir = strval($tab["stagingDir"]); - $this->_luceneDir = strval($tab["luceneDir"]); - $this->_dropFolderDir = strval($tab["dropFolderDir"]); - $this->_backupDir = strval($tab["backupDir"]); - $this->_repositoryUrl = strval($tab["repositoryUrl"]); - $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); - $this->_logFileRotation = strval($tab["logFileRotation"]); - $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); - $this->_partitionSize = strval($tab["partitionSize"]); - $this->_maxUploadSize = strval($tab["maxUploadSize"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_rootDir = strval($tab["rootDir"]); + $this->_httpRoot = strval($tab["httpRoot"]); + $this->_contentDir = strval($tab["contentDir"]); + if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR) + $this->_contentDir .= DIRECTORY_SEPARATOR; + $this->_cacheDir = strval($tab["cacheDir"]); + $this->_stagingDir = strval($tab["stagingDir"]); + $this->_luceneDir = strval($tab["luceneDir"]); + $this->_dropFolderDir = strval($tab["dropFolderDir"]); + $this->_backupDir = strval($tab["backupDir"]); + $this->_repositoryUrl = strval($tab["repositoryUrl"]); + $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); + $this->_logFileRotation = strval($tab["logFileRotation"]); + $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); + $this->_partitionSize = strval($tab["partitionSize"]); + $this->_maxUploadSize = strval($tab["maxUploadSize"]); + } // XML Path: /configuration/system/authentication $node = $xml->xpath('/configuration/system/authentication'); - $tab = $node[0]->attributes(); - $this->_enableGuestLogin = Settings::boolVal($tab["enableGuestLogin"]); - $this->_enableGuestAutoLogin = Settings::boolVal($tab["enableGuestAutoLogin"]); - $this->_enablePasswordForgotten = Settings::boolVal($tab["enablePasswordForgotten"]); - $this->_passwordStrength = intval($tab["passwordStrength"]); - $this->_passwordStrengthAlgorithm = strval($tab["passwordStrengthAlgorithm"]); - $this->_passwordExpiration = intval($tab["passwordExpiration"]); - $this->_passwordHistory = intval($tab["passwordHistory"]); - $this->_loginFailure = intval($tab["loginFailure"]); - $this->_autoLoginUser = intval($tab["autoLoginUser"]); - $this->_quota = intval($tab["quota"]); - $this->_undelUserIds = strval($tab["undelUserIds"]); - $this->_encryptionKey = strval($tab["encryptionKey"]); - $this->_cookieLifetime = intval($tab["cookieLifetime"]); - $this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]); - $this->_restricted = Settings::boolVal($tab["restricted"]); - $this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]); - $this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_enableGuestLogin = Settings::boolVal($tab["enableGuestLogin"]); + $this->_enableGuestAutoLogin = Settings::boolVal($tab["enableGuestAutoLogin"]); + $this->_enablePasswordForgotten = Settings::boolVal($tab["enablePasswordForgotten"]); + $this->_passwordStrength = intval($tab["passwordStrength"]); + $this->_passwordStrengthAlgorithm = strval($tab["passwordStrengthAlgorithm"]); + $this->_passwordExpiration = intval($tab["passwordExpiration"]); + $this->_passwordHistory = intval($tab["passwordHistory"]); + $this->_loginFailure = intval($tab["loginFailure"]); + $this->_autoLoginUser = intval($tab["autoLoginUser"]); + $this->_quota = intval($tab["quota"]); + $this->_undelUserIds = strval($tab["undelUserIds"]); + $this->_encryptionKey = strval($tab["encryptionKey"]); + $this->_cookieLifetime = intval($tab["cookieLifetime"]); + $this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]); + $this->_restricted = Settings::boolVal($tab["restricted"]); + $this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]); + $this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]); + } // XML Path: /configuration/system/authentication/connectors/connector // attributs mandatories : type enable @@ -566,13 +572,15 @@ class Settings { /* {{{ */ // XML Path: /configuration/system/database $node = $xml->xpath('/configuration/system/database'); - $tab = $node[0]->attributes(); - $this->_dbDriver = strval($tab["dbDriver"]); - $this->_dbHostname = strval($tab["dbHostname"]); - $this->_dbDatabase = strval($tab["dbDatabase"]); - $this->_dbUser = strval($tab["dbUser"]); - $this->_dbPass = strval($tab["dbPass"]); - $this->_doNotCheckDBVersion = Settings::boolVal($tab["doNotCheckDBVersion"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_dbDriver = strval($tab["dbDriver"]); + $this->_dbHostname = strval($tab["dbHostname"]); + $this->_dbDatabase = strval($tab["dbDatabase"]); + $this->_dbUser = strval($tab["dbUser"]); + $this->_dbPass = strval($tab["dbPass"]); + $this->_doNotCheckDBVersion = Settings::boolVal($tab["doNotCheckDBVersion"]); + } // XML Path: /configuration/system/smtp $node = $xml->xpath('/configuration/system/smtp'); @@ -601,34 +609,40 @@ class Settings { /* {{{ */ // XML Path: /configuration/advanced/display $node = $xml->xpath('/configuration/advanced/display'); - $tab = $node[0]->attributes(); - $this->_siteDefaultPage = strval($tab["siteDefaultPage"]); - $this->_rootFolderID = intval($tab["rootFolderID"]); - $this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]); - $this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_siteDefaultPage = strval($tab["siteDefaultPage"]); + $this->_rootFolderID = intval($tab["rootFolderID"]); + $this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]); + $this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]); + } // XML Path: /configuration/advanced/authentication $node = $xml->xpath('/configuration/advanced/authentication'); - $tab = $node[0]->attributes(); - $this->_guestID = intval($tab["guestID"]); - $this->_adminIP = strval($tab["adminIP"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_guestID = intval($tab["guestID"]); + $this->_adminIP = strval($tab["adminIP"]); + } // XML Path: /configuration/advanced/edition $node = $xml->xpath('/configuration/advanced/edition'); - $tab = $node[0]->attributes(); - $this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]); - $this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]); - $this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]); - $this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]); - $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); - $this->_versioningFileName = strval($tab["versioningFileName"]); - $this->_workflowMode = strval($tab["workflowMode"]); - $this->_allowReviewerOnly = Settings::boolval($tab["allowReviewerOnly"]); - $this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]); - $this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]); - $this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]); - $this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]); - $this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]); + if($node) { + $tab = $node[0]->attributes(); + $this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]); + $this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]); + $this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]); + $this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]); + $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); + $this->_versioningFileName = strval($tab["versioningFileName"]); + $this->_workflowMode = strval($tab["workflowMode"]); + $this->_allowReviewerOnly = Settings::boolval($tab["allowReviewerOnly"]); + $this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]); + $this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]); + $this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]); + $this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]); + $this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]); + } // XML Path: /configuration/advanced/notification $node = $xml->xpath('/configuration/advanced/notification'); @@ -641,18 +655,20 @@ class Settings { /* {{{ */ // XML Path: /configuration/advanced/server $node = $xml->xpath('/configuration/advanced/server'); - $tab = $node[0]->attributes(); - $this->_coreDir = strval($tab["coreDir"]); - $this->_luceneClassDir = strval($tab["luceneClassDir"]); - $this->_extraPath = strval($tab["extraPath"]); - $this->_contentOffsetDir = strval($tab["contentOffsetDir"]); - $this->_maxDirID = intval($tab["maxDirID"]); - $this->_updateNotifyTime = intval($tab["updateNotifyTime"]); - $this->_cmdTimeout = intval($tab["cmdTimeout"]); - if (isset($tab["maxExecutionTime"])) - $this->_maxExecutionTime = intval($tab["maxExecutionTime"]); - else - $this->_maxExecutionTime = ini_get("max_execution_time"); + if($node) { + $tab = $node[0]->attributes(); + $this->_coreDir = strval($tab["coreDir"]); + $this->_luceneClassDir = strval($tab["luceneClassDir"]); + $this->_extraPath = strval($tab["extraPath"]); + $this->_contentOffsetDir = strval($tab["contentOffsetDir"]); + $this->_maxDirID = intval($tab["maxDirID"]); + $this->_updateNotifyTime = intval($tab["updateNotifyTime"]); + $this->_cmdTimeout = intval($tab["cmdTimeout"]); + if (isset($tab["maxExecutionTime"])) + $this->_maxExecutionTime = intval($tab["maxExecutionTime"]); + else + $this->_maxExecutionTime = ini_get("max_execution_time"); + } // XML Path: /configuration/system/advanced/converters $convertergroups = $xml->xpath('/configuration/advanced/converters'); From 1bd5c9e3e4aa41d4a5f299c9e17407f8863c3dac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 11:30:57 +0200 Subject: [PATCH 3/8] fix typos, add info about davfs2 --- doc/README.WebDAV | 70 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/doc/README.WebDAV b/doc/README.WebDAV index 4211bae73..12670a283 100644 --- a/doc/README.WebDAV +++ b/doc/README.WebDAV @@ -13,17 +13,45 @@ and its content, while a file system knows just files. In SeedDMS a document is uniquely identified by its document id and not neccessarily by its name. A filesystem requires a unique paths for each file. Two identical files in the -same folder are not possible. SeedDMS can handle identifcally named +same folder are not possible. SeedDMS can handle identically named documents in one folder. In order to prevent any problems arising from this, you should always disallow identical document names in the settings. By definition a file in WebDAV is mapped on the latest version of a document in SeedDMS. There is no way to access previous -versions of a document via WebDAV. Whenever you modify a file, +versions of a document via WebDAV. Whenever you modify a file and +upload it with the web gui, a new version will be created. Unfortunately, this has some very -nasty side effects when you often save a file, because any save -operation will create a new version. This is because the WebDAV -server replaces the content of document instead of creating a new -version if a document is saved again. +nasty side effects when you edit a document version via WebDAV and +often save it, because any save +operation will create a new version. This is why the WebDAV +server has a configuration option which allows to either replace +the content of document or creating a new +version if a document is saved. + +Configuring davfs2 +=================== + +On Linux it is quite simple to mount the SeedDMS WebDAV server with +davfs2. Just place a line like the following in your /etc/fstab + +http://seeddms.your-domain.com/webdav/index.php /media/webdav davfs noauto,user,rw,uid=1000,gid=1000 + +and mount it as root with + +mount /media/webdav davfs + +You may as well want to configure davfs2 in /etc/davfs2/davfs2.conf by setting + +[/media/webdav] +use_locks 0 +gui_optimize 1 + +and possibly add your login data to /etc/davfs2/secrets + +/media/webdav admin secret + +Making applications work with WebDAV +===================================== Various programms have differnt strategies to save files to disk and prevent data lost under all circumstances. Those strategies often don't @@ -35,19 +63,31 @@ VIM vim does a lot more than just reading and writing the file you want to edit. It creates swap and backup files for data recovery if vim crashes -or is being kill unexpectivly. On a low bandwidth connection this can +or is being killed unexpectively. On a low bandwidth connection this can slow down the editing. For that reason you should either not create the swap file at all or create it outside the WebDAV server. A second problem arises from how vim modifіes the file you are editing. Before a file -is saved a backup is created and the new content is written into a new -file with the name of the original file. On a file system you -won't see a difference between the file before and after saveing, though -is actually a new one. In SeedDMS you won't notice a difference either -if just looking at the document name. It's still the same, but the +is saved a backup is created by renaming the file to the same name with a +'~' at the end and writing the file content into a new +file with the name of the original file. Afterwards vim deleteѕ the backup +file. On a regular file system you +won't see a difference between the file before and after saving, though +it is actually a new one. In SeedDMS you won't notice a difference either +by just looking at the document name. It's still the same, but the document id has changed. So saving a document will delete the old document and create a new one instead of creating a new version of the old document. If you don't want this behaviour, then tell vim -to not create the backup. Creating the backup file in a directory -outside of WebDAV doesn't help in this case. +to not create the backup file. You can do that by either passing additional +parameters to vim -vi "+set nobackup" "+set nobackuwrite" -n test.txt +vi "+set nobackup" "+set nowritebackup" -n test.txt + +or by setting them in your .vimrc + +set nobackup +set nowritebackup +set noswapfile + +Creating the backup file in a directory outside of WebDAV doesn't help in +this case, because it still does the file renaming which is turned of by +'nowritebackup'. From 453dfcd71eee74d9ca7e53a9291a871d1fd8688b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 11:32:10 +0200 Subject: [PATCH 4/8] check for _enableWebdavReplaceDoc in settings --- webdav/webdav.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/webdav/webdav.php b/webdav/webdav.php index c0790d390..e077e4858 100644 --- a/webdav/webdav.php +++ b/webdav/webdav.php @@ -91,7 +91,14 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server */ function log_options($methode, $options) { /* {{{ */ if($this->logger) { - $this->logger->log($methode.': '.$options['path'], PEAR_LOG_INFO); + switch($methode) { + case 'MOVE': + $msg = $methode.': '.$options['path'].' -> '.$options['dest']; + break; + default: + $msg = $methode.': '.$options['path']; + } + $this->logger->log($msg, PEAR_LOG_INFO); foreach($options as $key=>$option) { if(is_array($option)) { $this->logger->log($methode.': '.$key.'='.var_export($option, true), PEAR_LOG_DEBUG); @@ -613,7 +620,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server if($this->user->getID() == $lc->getUser()->getID() && $name == $lc->getOriginalFileName() && $fileType == $lc->getFileType() && - $mimetype == $lc->getMimeType()) { + $mimetype == $lc->getMimeType() && + $settings->_enableWebdavReplaceDoc) { if($this->logger) $this->logger->log('PUT: replacing latest version', PEAR_LOG_INFO); if(!$document->replaceContent($lc->getVersion(), $this->user, $tmpFile, $name, $fileType, $mimetype)) { From 70015878d0f0379f1abb1cc63a05dd9bd3b4cafb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 12:32:32 +0200 Subject: [PATCH 5/8] search() returns false in case of an error --- SeedDMS_Core/Core/inc.ClassDMS.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index df9161db3..0601688d7 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1677,13 +1677,17 @@ class SeedDMS_Core_DMS { // Send the complete search query to the database. $resArr = $this->db->getResultArray($searchQuery); + if($resArr === false) + return false; } else { $resArr = array(); } } else { // Send the complete search query to the database. $resArr = $this->db->getResultArray($searchQuery); - } + if($resArr === false) + return false; + } // ------------------- Ausgabe der Ergebnisse ---------------------------- $numResults = count($resArr); From 8f62039994c30178e6c0909f67079084473ed618 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 12:33:06 +0200 Subject: [PATCH 6/8] do not use views --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 4042f52de..ce1efd7bc 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -205,7 +205,7 @@ class SeedDMS_Core_DatabaseAccess { $this->_ttapproveid = false; $this->_ttstatid = false; $this->_ttcontentid = false; - $this->_useviews = true; + $this->_useviews = false; $this->_debug = false; } /* }}} */ From a074aa66069c2e597822041ab3f338ce8588ec76 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 12:33:46 +0200 Subject: [PATCH 7/8] check if search() returns false --- restapi/index.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 5013842d5..39e8ffe9a 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -427,7 +427,7 @@ function createFolder($id) { /* {{{ */ if($folder = $parent->addSubFolder($name, $comment, $userobj, 0, $newattrs)) { $rec = __getFolderData($folder); - $app->response()->status(201); + $app->response()->status(201); $app->response()->header('Content-Type', 'application/json'); echo json_encode(array('success'=>true, 'message'=>'', 'data'=>$rec)); } else { @@ -747,10 +747,10 @@ function uploadDocumentFile($documentId) { /* {{{ */ $app->response()->header('Content-Type', 'application/json'); echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>'')); } - } else { - if($document === null) + } else { + if($document === null) $app->response()->status(400); - else + else $app->response()->status(500); $app->response()->header('Content-Type', 'application/json'); echo json_encode(array('success'=>false, 'message'=>'No such document', 'data'=>'')); @@ -1226,6 +1226,10 @@ function doSearch() { /* {{{ */ if(!$limit = $app->request()->get('limit')) $limit = 5; $resArr = $dms->search($querystr); + if($resArr === false) { + $app->response()->header('Content-Type', 'application/json'); + echo json_encode(array()); + } $entries = array(); $count = 0; if($resArr['folders']) { @@ -1377,7 +1381,7 @@ function getUsers() { /* {{{ */ $users = $dms->getAllUsers(); $data = []; foreach($users as $u) - $data[] = __getUserData($u); + $data[] = __getUserData($u); $app->response()->header('Content-Type', 'application/json'); echo json_encode(array('success'=>true, 'message'=>'', 'data'=>$data)); @@ -1803,12 +1807,12 @@ function changeFolderAccess($id, $operationType, $userOrGroup) { /* {{{ */ function getCategories() { /* {{{ */ global $app, $dms, $userobj; - if(false === ($categories = $dms->getDocumentCategories())) { + if(false === ($categories = $dms->getDocumentCategories())) { $app->response()->status(500); - $app->response()->header('Content-Type', 'application/json'); - echo json_encode(array('success'=>false, 'message'=>'Could not get categories', 'data'=>null)); + $app->response()->header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'Could not get categories', 'data'=>null)); return; - } + } $data = []; foreach($categories as $category) $data[] = ['id' => (int)$category->getId(), 'name' => $category->getName()]; From fdd2e3ab37e2297f1b425f846c0179564f934702 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 12 Apr 2018 12:34:48 +0200 Subject: [PATCH 8/8] changes for 5.1.8 --- SeedDMS_Core/package.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 3a62fe77e..fa24a7360 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,7 +24,8 @@ GPL License -just bump version +SeedDMS_Core_DMS::search() returns false in case of an error +do not use views in DBAccessPDO by default anymore, use temp. tables