From 1aca53f63a209fe9f97dae40f9aa5e50199d77f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 25 Jan 2023 12:00:47 +0100 Subject: [PATCH 01/64] div.ajax update shows message when set in data-update-msg --- views/bootstrap/styles/application.js | 5 ++++- views/bootstrap4/styles/application.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index fef4a5614..2db927e99 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -503,6 +503,7 @@ $(document).ready( function() { var action = element.data('action'); var query = element.data('query'); var afterload = $(this).data('afterload'); + var updatemsg = element.data('update-msg'); if(view && action) { url = seeddms_webroot+base+"out/out."+view+".php?action="+action; if(query) { @@ -525,7 +526,9 @@ $(document).ready( function() { } else { url += "&"+param1; } - console.log(url); + //console.log(url); + if(typeof updatemsg != 'undefined') + element.html(updatemsg); if(!element.data('no-spinner')) element.prepend('
'); $.get(url, function(data) { diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 208a2f4c3..48fbe81e3 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -534,6 +534,7 @@ $(document).ready( function() { var action = element.data('action'); var query = element.data('query'); var afterload = $(this).data('afterload'); + var updatemsg = element.data('update-msg'); if(view && action) { url = seeddms_webroot+base+"out/out."+view+".php?action="+action; if(query) { @@ -556,7 +557,9 @@ $(document).ready( function() { } else { url += "&"+param1; } - console.log(url); + //console.log(url); + if(typeof updatemsg != 'undefined') + element.html(updatemsg); if(!element.data('no-spinner')) element.prepend('
'); $.get(url, function(data) { From 845317e27d8213af834822432f67ded11a1b7927 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:16:18 +0100 Subject: [PATCH 02/64] better documentation --- inc/inc.Tasks.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php index 50418cbc6..8fe23ba1a 100644 --- a/inc/inc.Tasks.php +++ b/inc/inc.Tasks.php @@ -14,8 +14,7 @@ class SeedDMS_ExpiredDocumentsTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ /** * Run the task * - * @param $task task to be executed - * @param $dms dms + * @param SeedDMS_SchedulerTask $task task to be executed * @return boolean true if task was executed succesfully, otherwise false */ public function execute(SeedDMS_SchedulerTask $task) { @@ -305,7 +304,7 @@ class SeedDMS_IndexingDocumentsTask extends SeedDMS_SchedulerTaskBase { /* {{{ * /** * Run the task * - * @param $task task to be executed + * @param SeedDMS_SchedulerTask $task task to be executed * @return boolean true if task was executed succesfully, otherwise false */ public function execute(SeedDMS_SchedulerTask $task) { @@ -402,7 +401,7 @@ class SeedDMS_CheckSumTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ /** * Run the task * - * @param $task task to be executed + * @param SeedDMS_SchedulerTask $task task to be executed * @return boolean true if task was executed succesfully, otherwise false */ public function execute(SeedDMS_SchedulerTask $task) { @@ -489,7 +488,7 @@ class SeedDMS_PreviewTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ /** * Run the task * - * @param $task task to be executed + * @param SeedDMS_SchedulerTask $task task to be executed * @return boolean true if task was executed succesfully, otherwise false */ public function execute(SeedDMS_SchedulerTask $task) { @@ -541,7 +540,7 @@ class SeedDMS_CalendarTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ /** * Run the task * - * @param $task task to be executed + * @param SeedDMS_SchedulerTask $task task to be executed * @return boolean true if task was executed succesfully, otherwise false */ public function execute(SeedDMS_SchedulerTask $task) { From 1ab07d53f78992edcc08e178c4e7e4155e1fb7bc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:16:47 +0100 Subject: [PATCH 03/64] better and more verbose logging --- utils/schedulercli.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/schedulercli.php b/utils/schedulercli.php index e45e9432f..b0f8a2029 100644 --- a/utils/schedulercli.php +++ b/utils/schedulercli.php @@ -90,14 +90,16 @@ foreach($tasks as $task) { * to fast, but this is up to the admin of seeddms. */ $task->updateLastNextRun(); + add_log_line("Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()); + echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."\n"; if($taskobj->execute($task)) { - add_log_line("Execution of task ".$task->getExtension()."::".$task->getTask()." successful."); + add_log_line("Execution of task '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."' successful."); } else { - add_log_line("Execution of task ".$task->getExtension()."::".$task->getTask()." failed, task has been disabled.", PEAR_LOG_ERR); + add_log_line("Execution of task ".$task->getExtension()."::".$task->getTask()."::".$task->getName()." failed, task has been disabled.", PEAR_LOG_ERR); $task->setDisabled(1); } } elseif($mode == 'dryrun') { - echo "Running ".$task->getExtension()."::".$task->getTask()." in dry mode\n"; + echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."' in dry mode\n"; } } } @@ -120,7 +122,7 @@ foreach($tasks as $task) { } else { echo "-"; } - echo " ".$task->getExtension()."::".$task->getTask().""; + echo " '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."'"; echo " ".$task->getNextRun(); echo " ".$task->getFrequency(); echo "\n"; From 42a81b6b0e4c3114e28e7ec861ebf2b0020e146d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:17:34 +0100 Subject: [PATCH 04/64] eval parameter 'multiple' --- views/bootstrap/class.SchedulerTaskMgr.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index 64ec3706b..68726fe27 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -401,7 +401,10 @@ $(document).ready( function() { ); break; case 'select': - $vals = $task->getParameter()[$param['name']]; + if(!empty($param['multiple'])) + $vals = $task->getParameter()[$param['name']]; + else + $vals = [$task->getParameter()[$param['name']]]; foreach($param['options'] as &$opt) { if(in_array($opt[0], $vals)) $opt[2] = true; @@ -411,7 +414,7 @@ $(document).ready( function() { array( 'element'=>'select', 'class'=>'chzn-select', - 'name'=>'params['.$param['name'].'][]', + 'name'=>'params['.$param['name'].']'.(!empty($param['multiple']) ? '[]' : ''), 'multiple'=>isset($param['multiple']) ? $param['multiple'] : false, 'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))), 'options'=>$param['options'], @@ -429,7 +432,10 @@ $(document).ready( function() { ); break; case "users": - $userids = $task->getParameter()[$param['name']]; + if(!empty($param['multiple'])) + $userids = $task->getParameter()[$param['name']]; + else + $userids = [$task->getParameter()[$param['name']]]; $users = $dms->getAllUsers(); foreach ($users as $currUser) { if (!$currUser->isGuest()) @@ -440,7 +446,7 @@ $(document).ready( function() { array( 'element'=>'select', 'class'=>'chzn-select', - 'name'=>'params['.$param['name'].'][]', + 'name'=>'params['.$param['name'].']'.(!empty($param['multiple']) ? '[]' : ''), 'multiple'=>isset($param['multiple']) ? $param['multiple'] : false, 'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))), 'options'=>$options From e87d7546a36efe1bfca06fb6832ed8a8c1618045 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:18:40 +0100 Subject: [PATCH 05/64] handle proxy settings and _baseUrl in settings in getBaseUrl() --- inc/inc.Utils.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index dda92a894..25d3a0ecb 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -795,7 +795,21 @@ function sendFile($filename) { /* {{{ */ * @return string */ function getBaseUrl() { /* {{{ */ - return "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST']; + global $settings; + + if(!empty($settings->_baseUrl)) + return $settings->_baseUrl; + + if(isset($_SERVER['X-Forwarded-Host'])) + $host = $_SERVER['X-Forwarded-Host']; + else + $host = $_SERVER['HTTP_HOST']; + if(isset($_SERVER['X-Forwarded-Proto'])) + $ssl = $_SERVER['X-Forwarded-Proto'] == 'https'; + else + $ssl = (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)); + + return "http".($ssl ? "s" : "")."://".$host; } /* }}} */ function getToken($length){ /* {{{ */ From 970622564cb001bab67b06df7e0934bd40c9f7c8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:19:28 +0100 Subject: [PATCH 06/64] SeedDMSTask.add() returns taskid, task will be passed to function of task --- views/bootstrap/styles/application.js | 4 ++-- views/bootstrap4/styles/application.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index 2db927e99..23ef17802 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -1407,14 +1407,14 @@ $(document).ready(function() { /* {{{ */ ); SeedDMSTask.add = function(task) { - tasks.push(task); + return tasks.push(task); } SeedDMSTask.run = function() { for(let task of tasks) { if(counter % task.interval == 0) { // console.log("Running task '" + task.name + "'"); - task.func(); + task.func(task); } } //console.log(counter); diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js index 48fbe81e3..a6a46ad5c 100644 --- a/views/bootstrap4/styles/application.js +++ b/views/bootstrap4/styles/application.js @@ -1463,14 +1463,14 @@ $(document).ready(function() { /* {{{ */ ); SeedDMSTask.add = function(task) { - tasks.push(task); + return tasks.push(task); } SeedDMSTask.run = function() { for(let task of tasks) { if(counter % task.interval == 0) { // console.log("Running task '" + task.name + "'"); - task.func(); + task.func(task); } } //console.log(counter); From b495fd248b5fe5a6cda815c7e4ce67ec1b9af473 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 13:29:46 +0100 Subject: [PATCH 07/64] add baseUrl for those cases where seeddms cannot determine the host and protocol itself --- inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 1 + 3 files changed, 6 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index e695242fc..002bb3312 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -95,6 +95,8 @@ class Settings { /* {{{ */ var $_coreDir = null; // Path to SeedDMS_Lucene var $_luceneClassDir = null; + // The base URL without _httpRoot + var $_baseUrl = ""; // The relative path in the URL, after the domain part. var $_httpRoot = "/seeddms/"; // Where the uploaded files are stored (best to choose a directory that @@ -565,6 +567,7 @@ class Settings { /* {{{ */ if($node) { $tab = $node[0]->attributes(); $this->_rootDir = strval($tab["rootDir"]); + $this->_baseUrl = strval($tab["baseUrl"]); $this->_httpRoot = strval($tab["httpRoot"]); $this->_contentDir = strval($tab["contentDir"]); if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR) @@ -935,6 +938,7 @@ class Settings { /* {{{ */ $this->getXMLNode($xml, '/configuration', 'system'); $node = $this->getXMLNode($xml, '/configuration/system', 'server'); $this->setXMLAttributValue($node, "rootDir", $this->_rootDir); + $this->setXMLAttributValue($node, "baseUrl", $this->_baseUrl); $this->setXMLAttributValue($node, "httpRoot", $this->_httpRoot); $this->setXMLAttributValue($node, "contentDir", $this->_contentDir); $this->setXMLAttributValue($node, "cacheDir", $this->_cacheDir); diff --git a/op/op.Settings.php b/op/op.Settings.php index 33cbecbaa..dfd8206d4 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -167,6 +167,7 @@ if ($action == "saveSettings") // SETTINGS - SYSTEM - SERVER setDirValue("rootDir"); + setStrValue("baseUrl"); setStrValue("httpRoot"); setDirValue("contentDir"); setDirValue("cacheDir"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 761939b44..20cbc8142 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -407,6 +407,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) --> showConfigHeadline('settings_Server'); ?> showConfigText('settings_rootDir', 'rootDir'); ?> +showConfigText('settings_baseUrl', 'baseUrl'); ?> showConfigText('settings_httpRoot', 'httpRoot'); ?> showConfigText('settings_contentDir', 'contentDir'); ?> showConfigText('settings_backupDir', 'backupDir'); ?> From bdcaf2b5f37341b157a41f741744c447d36a287f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 18:42:28 +0100 Subject: [PATCH 08/64] minor correction of log messages --- utils/schedulercli.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/schedulercli.php b/utils/schedulercli.php index b0f8a2029..1cb4f6557 100644 --- a/utils/schedulercli.php +++ b/utils/schedulercli.php @@ -90,8 +90,8 @@ foreach($tasks as $task) { * to fast, but this is up to the admin of seeddms. */ $task->updateLastNextRun(); - add_log_line("Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()); - echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."\n"; + add_log_line("Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."'"); + echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."'\n"; if($taskobj->execute($task)) { add_log_line("Execution of task '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."' successful."); } else { From d30ba981be53acb3c38f06956094ff3dbb03cc8a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 20:55:42 +0100 Subject: [PATCH 09/64] add functions to return type of object type of attribute definitions --- inc/inc.Language.php | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index bf9636993..9dbcc1819 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -262,6 +262,66 @@ function getOverallStatusText($status) { /* {{{ */ } } /* }}} */ +function getAttributeTypeText($attrdef) { /* {{{ */ + switch($attrdef->getType()) { + case SeedDMS_Core_AttributeDefinition::type_int: + $t = getMLText("attrdef_type_int"); + break; + case SeedDMS_Core_AttributeDefinition::type_float: + $t = getMLText("attrdef_type_float"); + break; + case SeedDMS_Core_AttributeDefinition::type_string: + $t = getMLText("attrdef_type_string"); + break; + case SeedDMS_Core_AttributeDefinition::type_boolean: + $t = getMLText("attrdef_type_boolean"); + break; + case SeedDMS_Core_AttributeDefinition::type_date: + $t = getMLText("attrdef_type_date"); + break; + case SeedDMS_Core_AttributeDefinition::type_email: + $t = getMLText("attrdef_type_email"); + break; + case SeedDMS_Core_AttributeDefinition::type_url: + $t = getMLText("attrdef_type_url"); + break; + case SeedDMS_Core_AttributeDefinition::type_boolean: + $t = getMLText("attrdef_type_boolean"); + break; + case SeedDMS_Core_AttributeDefinition::type_folder: + $t = getMLText("attrdef_type_folder"); + break; + case SeedDMS_Core_AttributeDefinition::type_document: + $t = getMLText("attrdef_type_document"); + break; + case SeedDMS_Core_AttributeDefinition::type_user: + $t = getMLText("attrdef_type_user"); + break; + case SeedDMS_Core_AttributeDefinition::type_group: + $t = getMLText("attrdef_type_group"); + break; + } + return $t; +} /* }}} */ + +function getAttributeObjectTypeText($attrdef) { /* {{{ */ + switch($attrdef->getObjType()) { + case SeedDMS_Core_AttributeDefinition::objtype_all: + $ot = getMLText("all"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_folder: + $ot = getMLText("folder"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_document: + $ot = getMLText("document"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_documentcontent: + $ot = getMLText("documentcontent"); + break; + } + return $ot; +} /* }}} */ + function getAttributeValidationText($error, $attrname='', $attrvalue='', $regex='') { /* {{{ */ $arr = getAttributeValidationError($error, $attrname, $attrvalue, $regex); From 12a9762c9600fe202548dc8f5f29382539ae2d2e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 20:57:59 +0100 Subject: [PATCH 10/64] use getAttributeTypeText() and getAttributeObjectTypeText() --- views/bootstrap/class.AttributeMgr.php | 54 +------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index f73a40589..dc9e09cd9 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -346,58 +346,8 @@ $(document).ready( function() { getObjType()) { - case SeedDMS_Core_AttributeDefinition::objtype_all: - $ot = getMLText("all"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_folder: - $ot = getMLText("folder"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_document: - $ot = getMLText("document"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_documentcontent: - $ot = getMLText("documentcontent"); - break; - } - switch($attrdef->getType()) { - case SeedDMS_Core_AttributeDefinition::type_int: - $t = getMLText("attrdef_type_int"); - break; - case SeedDMS_Core_AttributeDefinition::type_float: - $t = getMLText("attrdef_type_float"); - break; - case SeedDMS_Core_AttributeDefinition::type_string: - $t = getMLText("attrdef_type_string"); - break; - case SeedDMS_Core_AttributeDefinition::type_boolean: - $t = getMLText("attrdef_type_boolean"); - break; - case SeedDMS_Core_AttributeDefinition::type_date: - $t = getMLText("attrdef_type_date"); - break; - case SeedDMS_Core_AttributeDefinition::type_email: - $t = getMLText("attrdef_type_email"); - break; - case SeedDMS_Core_AttributeDefinition::type_url: - $t = getMLText("attrdef_type_url"); - break; - case SeedDMS_Core_AttributeDefinition::type_boolean: - $t = getMLText("attrdef_type_boolean"); - break; - case SeedDMS_Core_AttributeDefinition::type_folder: - $t = getMLText("attrdef_type_folder"); - break; - case SeedDMS_Core_AttributeDefinition::type_document: - $t = getMLText("attrdef_type_document"); - break; - case SeedDMS_Core_AttributeDefinition::type_user: - $t = getMLText("attrdef_type_user"); - break; - case SeedDMS_Core_AttributeDefinition::type_group: - $t = getMLText("attrdef_type_group"); - break; - } + $ot = getAttributeObjectTypeText($attrdef); + $t = getAttributeTypeText($attrdef); print ""; } echo ""; } else { From 2ab8cd52156759f895994b533a4368b572a06a87 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 21:05:53 +0100 Subject: [PATCH 12/64] init $t and $ot --- inc/inc.Language.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index 9dbcc1819..47e32c6e9 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -263,6 +263,7 @@ function getOverallStatusText($status) { /* {{{ */ } /* }}} */ function getAttributeTypeText($attrdef) { /* {{{ */ + $t = ''; switch($attrdef->getType()) { case SeedDMS_Core_AttributeDefinition::type_int: $t = getMLText("attrdef_type_int"); @@ -305,6 +306,7 @@ function getAttributeTypeText($attrdef) { /* {{{ */ } /* }}} */ function getAttributeObjectTypeText($attrdef) { /* {{{ */ + $ot = ''; switch($attrdef->getObjType()) { case SeedDMS_Core_AttributeDefinition::objtype_all: $ot = getMLText("all"); From 81ff5aef939697917b739b02d5ac372431bde87f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Feb 2023 19:15:54 +0100 Subject: [PATCH 13/64] fix indenting of line --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 192233972..d7e3cec6a 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -39,7 +39,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { } /* }}} */ protected function showEndPaneContent($name, $currenttab) { /* {{{ */ - echo ''; + echo ''; $this->contentContainerEnd(); parent::showEndPaneContent($name, $currenttab); } /* }}} */ From ef9e685f5524d323fb2444515aa2a3da59f02df1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Feb 2023 15:14:38 +0100 Subject: [PATCH 14/64] set libfolder to null if not accessible, but do no issue a error --- out/out.AddDocument.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index 84df7af84..9e7d3e331 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -59,13 +59,8 @@ if($settings->_quota > 0) { if($settings->_libraryFolder) { $libfolder = $dms->getFolder($settings->_libraryFolder); - if (!is_object($libfolder)) { - UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); - } - - if ($libfolder->getAccessMode($user) < M_READ) { + if (!is_object($libfolder) || $libfolder->getAccessMode($user) < M_READ) { $libfolder = null; -// UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($libfolder->getName()))), getMLText("access_denied")); } } else { $libfolder = null; From 477c79d5a45a5d7b72aaed181ab00c1a8a66da7c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 7 Feb 2023 12:37:16 +0100 Subject: [PATCH 15/64] add warning that preview images are recreated --- CHANGELOG | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 98db08582..aa61edd6e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,12 +6,13 @@ - update jquery to 3.6.1 (only bootstrap4 theme) - introduce authentication service - new hook in restapi to add middleware -- previews for png, txt, pdf in different directories +- previews for png, txt, pdf in different directories. This will + enforce a recreation of all cached preview images, pdf and text files! - various improvements of fulltext service - show number of documents per category in category manager - show number of keywords per category in keyword manager - improve drag&drop with clipboard -- old pear packages for SeedDMS/Core, SeedDMS/Lucene, SeedDMS/Preview +- old pear packages SeedDMS/Core, SeedDMS/Lucene, SeedDMS/Preview are now based on composer and has moved into vendor dir -------------------------------------------------------------------------------- From ff4ebb0c38951f75ad2a031335f81b45ee5d050c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 7 Feb 2023 12:40:24 +0100 Subject: [PATCH 16/64] various minor translation updates --- languages/ar_EG/lang.inc | 3 +++ languages/bg_BG/lang.inc | 3 +++ languages/ca_ES/lang.inc | 3 +++ languages/cs_CZ/lang.inc | 3 +++ languages/de_DE/lang.inc | 7 +++++-- languages/el_GR/lang.inc | 3 +++ languages/en_GB/lang.inc | 9 ++++++--- languages/es_ES/lang.inc | 3 +++ languages/fr_FR/lang.inc | 3 +++ languages/hr_HR/lang.inc | 7 +++++-- languages/hu_HU/lang.inc | 3 +++ languages/id_ID/lang.inc | 3 +++ languages/it_IT/lang.inc | 3 +++ languages/ko_KR/lang.inc | 3 +++ languages/lo_LA/lang.inc | 3 +++ languages/nb_NO/lang.inc | 3 +++ languages/nl_NL/lang.inc | 3 +++ languages/pl_PL/lang.inc | 7 +++++-- languages/pt_BR/lang.inc | 3 +++ languages/ro_RO/lang.inc | 3 +++ languages/ru_RU/lang.inc | 3 +++ languages/sk_SK/lang.inc | 3 +++ languages/sv_SE/lang.inc | 3 +++ languages/tr_TR/lang.inc | 3 +++ languages/uk_UA/lang.inc | 3 +++ languages/zh_CN/lang.inc | 3 +++ languages/zh_TW/lang.inc | 3 +++ 27 files changed, 90 insertions(+), 9 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index cd2d4efa8..53291a814 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -1400,6 +1400,8 @@ URL: [url]', 'settings_available_languages_desc' => 'اللغات الموجودة', 'settings_backupDir' => 'backupDir', 'settings_backupDir_desc' => 'backupDir', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'cacheDir', 'settings_cacheDir_desc' => 'cacheDir', 'settings_Calendar' => 'اعدادات التقويم', @@ -1852,6 +1854,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'بحث غير صالح', 'splash_invalid_search_service' => '', 'splash_link_document' => 'رابط المستند', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'انتقلت الحافظة', 'splash_move_document' => 'نقل المستند', 'splash_move_folder' => 'نقل الملف', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 638bee68a..b72bf52db 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -1263,6 +1263,8 @@ $text = array( 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Кеш папка', 'settings_cacheDir_desc' => 'къде се съхраняват превю картинките (най-добре да се избере папка която не е достъпна през web-server-а)', 'settings_Calendar' => 'Настройки календар', @@ -1715,6 +1717,7 @@ $text = array( 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 6dc899353..376c8c35b 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -1268,6 +1268,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '', 'settings_cacheDir_desc' => '', 'settings_Calendar' => '', @@ -1720,6 +1722,7 @@ URL: [url]', 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 5e1c17a38..ddbfe9d0a 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -1472,6 +1472,8 @@ Jméno: [username] 'settings_available_languages_desc' => 'Zvolí se pouze vybrané jazyky, které se zobrazí v seznamu jazyků. Výchozí jazyk bude vždy načten.', 'settings_backupDir' => 'Záložní adresář', 'settings_backupDir_desc' => 'Adresář, kde zálohovací nástroj ukládá zálohy. Pokud tento adresář není nastaven nebo není k němu přístup, zálohy budou uloženy v adresáři obsahu.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Adresář mezipaměti', 'settings_cacheDir_desc' => 'Kde jsou uloženy náhledy obrázků (nejlepší zvolit adresář, který není přístupný přes webový server)', 'settings_Calendar' => 'Nastavení kalendáře', @@ -1924,6 +1926,7 @@ Jméno: [username] 'splash_invalid_searchterm' => 'Neplatný vyhledávací dotaz', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schránka přenesena do aktuální složky', 'splash_move_document' => 'Dokument přesunut', 'splash_move_folder' => 'Složka přesunuta', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 5a6724d31..b05acb3b3 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (3154), dgrutsch (22) +// Translators: Admin (3158), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -1804,6 +1804,8 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'settings_available_languages_desc' => 'Nur die hier ausgewählten Sprachen werden geladen und erscheinen bei der Sprachauswahl. Die voreingestellte Sprache wird immer geladen.', 'settings_backupDir' => 'Sicherungs-Verzeichnis', 'settings_backupDir_desc' => 'Verzeichnis in dem das Backup-Tool die Sicherungen ablegt. Wenn hier kein Wert gesetzt wird oder auf das Verzeichnis nicht zugriffen werden kann, dann werden die Sicherungen im Content-Verzeichnis abgelegt.', +'settings_baseUrl' => 'Basis URL', +'settings_baseUrl_desc' => 'Dies ist die URL des Servers ohne das HTTP Wurzelverzeichnis. In der Regel kann SeedDMS dies selbst bestimmen. Hinter einem Proxy gelingt dies aber nicht zuverlässig. Für diesen Fall können Sie die Basis URL hier setzen.', 'settings_cacheDir' => 'Cache Verzeichnis', 'settings_cacheDir_desc' => 'Verzeichnis in dem Vorschaubilder abgelegt werden. Dies sollte ein Verzeichnis sein, auf das man über den Web-Browser keinen direkten Zugriff hat.', 'settings_Calendar' => 'Kalender-Einstellungen', @@ -2256,6 +2258,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'splash_invalid_searchterm' => 'Ungültiger Suchbegriff', 'splash_invalid_search_service' => 'Ungültiger Suchdienst', 'splash_link_document' => 'Link hinzugefügt', +'splash_mimetype_changed' => 'Mime-Type erfolgreich gerändert', 'splash_moved_clipboard' => 'Inhalt der Zwischenablage in aktuellen Ordner verschoben', 'splash_move_document' => 'Dokument verschoben', 'splash_move_folder' => 'Ordner verschoben', @@ -2358,7 +2361,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'task_description' => 'Beschreibung', 'task_disabled' => 'Deaktiviert', 'task_frequency' => 'Häufigkeit', -'task_frequency_placeholder' => 'm h d m dow', +'task_frequency_placeholder' => 'm h d m dow, or @daily, @hourly', 'task_last_run' => 'Letzte Ausführung', 'task_name' => 'Name', 'task_next_run' => 'Nächste Ausführung', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 6def8ae2b..6f4ba01f6 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -1274,6 +1274,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '', 'settings_cacheDir_desc' => '', 'settings_Calendar' => '', @@ -1726,6 +1728,7 @@ URL: [url]', 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index e9e6a6162..d71f837fd 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (2248), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2253), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -251,7 +251,7 @@ URL: [url]

', 'attribute_value_not_in_valueset' => 'Value not in value set', 'attr_malformed_boolean' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid boolean.', 'attr_malformed_date' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid date.', -'attr_malformed_email' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid URL.', +'attr_malformed_email' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid email.', 'attr_malformed_float' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid float.', 'attr_malformed_int' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid integer.', 'attr_malformed_url' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid URL.', @@ -1807,6 +1807,8 @@ If you did not receive a password, please use the password forgotten function on 'settings_available_languages_desc' => 'Only the selected languages will be loaded and show up in the language selector. The default language will always be loaded.', 'settings_backupDir' => 'Backup directory', 'settings_backupDir_desc' => 'Directory where the backup tool saves backups. If this directory is not set or cannot be accessed, then the backups will be saved in the content directory.', +'settings_baseUrl' => 'Base URL', +'settings_baseUrl_desc' => 'This is the URL without the HTTP root dir. Usually, this is determined by SeedDMS. Behind a proxy this can fail and in this case set it manually.', 'settings_cacheDir' => 'Cache directory', 'settings_cacheDir_desc' => 'Where the preview images are stored (best to choose a directory that is not accessible through your web-server)', 'settings_Calendar' => 'Calendar settings', @@ -2259,6 +2261,7 @@ If you did not receive a password, please use the password forgotten function on 'splash_invalid_searchterm' => 'Invalid search term', 'splash_invalid_search_service' => 'Invalid search service', 'splash_link_document' => 'Link added', +'splash_mimetype_changed' => 'Mimetype changed successfully', 'splash_moved_clipboard' => 'Clipboard moved into current folder', 'splash_move_document' => 'Document moved', 'splash_move_folder' => 'Folder moved', @@ -2361,7 +2364,7 @@ If you did not receive a password, please use the password forgotten function on 'task_description' => 'Description', 'task_disabled' => 'Disabled', 'task_frequency' => 'Frequency', -'task_frequency_placeholder' => 'm h d m dow', +'task_frequency_placeholder' => 'm h d m dow, or @daily, @hourly', 'task_last_run' => 'Last run', 'task_name' => 'Name', 'task_next_run' => 'Next run', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index a982be52c..f4ef83a82 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -1427,6 +1427,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Unicamente los lenguages seleccionados seran cargados y mostrados en el selector de lenguages. El lenguage por defecto siempre sera cargado', 'settings_backupDir' => 'Directorio de copia de seguridad', 'settings_backupDir_desc' => 'Directorio donde la herramienta de respaldos guarda los respaldos. Si este directorio no se crea o no puede ser accedido, entonces los respaldos serán guardados en el directorio de contenido.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Carpeta caché', 'settings_cacheDir_desc' => 'Donde están archivadas las imágenes anteriores (mejor elegir una carpeta que no sea accesible a través de su servidor web)', 'settings_Calendar' => 'Configuración de calendario', @@ -1879,6 +1881,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Término de búsqueda inválido', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Portapapeles movido a la carpeta actual', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index cac907550..0d92ba8fa 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1790,6 +1790,8 @@ Nom : [username] 'settings_available_languages_desc' => 'Seules les langues sélectionnées seront chargées et proposées dans le sélecteur de langue. La langue par défaut est systématiquement chargée.', 'settings_backupDir' => 'Répertoire de sauvegarde', 'settings_backupDir_desc' => 'Répertoire dans lequel l’outil de sauvegarde stocke les sauvegardes. Si aucune valeur n’est définie ou si le répertoire n’est pas accessible, les sauvegardes seront stockées dans le répertoire de contenu.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Répertoire Cache', 'settings_cacheDir_desc' => 'Lieu de stockage des images de prévisualisation (choisir de préférence un dossier non accessible à travers le web-server)', 'settings_Calendar' => 'Paramètres de l\'agenda', @@ -2242,6 +2244,7 @@ Nom : [username] 'splash_invalid_searchterm' => 'Recherche invalide', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Lien ajouté', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Contenu du presse-papier déplacé vers le dossier en cours', 'splash_move_document' => 'Document déplacé', 'splash_move_folder' => 'Dossier déplacé', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index c9fafeb28..8b4537ec4 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1250), marbanas (16) +// Translators: Admin (1251), marbanas (16) $text = array( '2_factor_auth' => '2-faktorska autentikacija', @@ -212,7 +212,7 @@ Internet poveznica: [url]', 'attribute_value_not_in_valueset' => '', 'attr_malformed_boolean' => '', 'attr_malformed_date' => '', -'attr_malformed_email' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći URL.', +'attr_malformed_email' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći email.', 'attr_malformed_float' => '', 'attr_malformed_int' => '', 'attr_malformed_url' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći URL.', @@ -1436,6 +1436,8 @@ Internet poveznica: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Mapa za sigurnosnu kopiju', 'settings_backupDir_desc' => 'Mapa gdje alat za sigurnosne kopije sprema podatke. Ako ova mapa nije postavljena ili joj se ne može pristupiti, tada se sigurnosne kopije spremaju u mapu sadržaja.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Mapa predmemorije', 'settings_cacheDir_desc' => 'Gdje se spremaju slike pregleda (najbolje da odaberete mapu koja nije dostupna kroz vaš web-server)', 'settings_Calendar' => 'Postavke kalendara', @@ -1888,6 +1890,7 @@ Internet poveznica: [url]', 'splash_invalid_searchterm' => 'Nevažeći traženi pojam', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Međuspremnik je premješten u trenutnu mapu', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index d4f23f05b..33020bc6a 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -1414,6 +1414,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Mentés könyvtára', 'settings_backupDir_desc' => 'Könyvtár, ahol a biztonsági mentési eszköz mentéseket készít. Ha ez a könyvtár nincs beállítva vagy nem érhető el, akkor a biztonsági másolatot a tartalom könyvtárba menti.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Átmeneti állományok könyvtára', 'settings_cacheDir_desc' => 'Ahol az előnézeti képek tárolódnak (legjobb olyan könyvtárat választani, amit a web-kiszolgálón keresztül nem lehet elérni)', 'settings_Calendar' => 'Naptár beállítások', @@ -1866,6 +1868,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Érvénytelen keresési feltétel', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Vágólap tartalom áthelyezve az aktuális mappába', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index 0b1f69d52..e350f55ee 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -1488,6 +1488,8 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'settings_available_languages_desc' => 'Hanya bahasa yang dipilih yang akan dimuat dan muncul di pemilih bahasa. Bahasa default akan selalu dimuat.', 'settings_backupDir' => 'Direktori cadangan', 'settings_backupDir_desc' => 'Direktori tempat alat pencadangan menyimpan cadangan. Jika direktori ini tidak disetel atau tidak dapat diakses, maka cadangan akan disimpan di direktori konten.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Direktori cache', 'settings_cacheDir_desc' => 'Di mana gambar pratinjau disimpan (paling baik memilih direktori yang tidak dapat diakses melalui server web Anda)', 'settings_Calendar' => 'Pengaturan kalender', @@ -1940,6 +1942,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Tautan ditambahkan', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => 'Dokumen dipindahkan', 'splash_move_folder' => 'Folder dipindahkan', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index b329f50c7..4ca0d5e17 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -1463,6 +1463,8 @@ Name: [username] 'settings_available_languages_desc' => 'Solo le lingue selezionate verranno caricate e mostrate nel selettore. La lingua predefinita sarà sempre caricata.', 'settings_backupDir' => 'Directory di backup', 'settings_backupDir_desc' => 'Directory in cui lo strumento di backup salva i backup. Se questa directory non è impostato o non è possibile accedervi, quindi i backup vengono salvati nella directory dei contenuti.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cartella di cache', 'settings_cacheDir_desc' => 'Cartella in cui vengono conservate le immagini di anteprima, si consiglia di scegliere una cartella sul web-server che non sia direttamente accessibile.', 'settings_Calendar' => 'Impostazioni calendario', @@ -1915,6 +1917,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Termine di ricerca non valido', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Collegamento aggiunto', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Appunti trasferiti nella cartella corrente', 'splash_move_document' => 'Documento spostato', 'splash_move_folder' => 'Cartella spostato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 125527d64..854106a58 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -1430,6 +1430,8 @@ URL : [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '백업 디랙토리', 'settings_backupDir_desc' => '백업 도구가 백업을 저장할 디렉토리. 이 디렉토리가 설정되어 있지 않거나 액세스 할 수 없는 경우 백업은 컨텐츠 디렉토리에 저장 됩니다.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '캐시 디렉토리', 'settings_cacheDir_desc' => '미리보기 이미지 에 저장된다.(웹 서버를 통해 액세스 할 수없는 디렉토리를 선택하는 것이 좋습니다)', 'settings_Calendar' => '캘린더 설정', @@ -1882,6 +1884,7 @@ URL : [url]', 'splash_invalid_searchterm' => '잘못된 검색 범위', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '클립 보드가 현재 폴더로 이동', 'splash_move_document' => '문서 옮겨짐', 'splash_move_folder' => '폴더 옮겨짐', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index d8edb5a13..d91d7c9ee 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -1456,6 +1456,8 @@ URL: [url]', 'settings_available_languages_desc' => 'ລະບົບຈະໂຫລດສະເພາະພາສາທີ່ເລືອກແລະສະແດງໃນຕົວເລືອກ ພາສາເລີ້ມຕົ້ນຈະຖືກໂຫລດສະເໝີ', 'settings_backupDir' => 'ໄດເລັກທໍລີສຳຮອງ', 'settings_backupDir_desc' => 'ໄດເລິກທໍລີ້ເຄື່ອງມືສຳຮອງຈະບັນທຶກຂໍ້ມູນສຳຮອງ ຖ້າບບໍ່ມີການຕັ້ງຄ່າໄດ້ເລັກທໍລີ້ນີ້ຫຼືບໍ່ສາມາດເຂົ້າເຖິງໄດ້ການສຳຮອງຂໍ້ມູນຈະໄດ້ຮັບການບັນທຶກເນື້ອຫາໄວ້ໃນໄດເລັກທໍລີ້', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'ແຄຣໄດ້ເລັກທໍລີ້', 'settings_cacheDir_desc' => 'ບ່ອນເກັບຮູບພາບຕົວຢ່າງໄວ້ ເລືອກໄດເລັກທໍລີທີບໍ່ສາມາດເຂົ້າເຖິງໄດ້ຈາກເວັບເຊີເວີຂອງເຈົ້າ', 'settings_Calendar' => 'ການຕັ້ງຄ່າປະຕິທິນ', @@ -1908,6 +1910,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'ຄຳຄົນຫາບໍ່ຖືກຕ້ອງ', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'ຍ້າຍຄິບບອດໄປທີ່ໂຟລເດີປັດຈຸບັນແລ້ວ', 'splash_move_document' => 'ຍ້າຍເອກະສານແລ້ວ', 'splash_move_folder' => 'ຍ້າຍໂຟລເດີແລ້ວ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 621c36a29..b233e49fa 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -1469,6 +1469,8 @@ Bruker: [username] 'settings_available_languages_desc' => 'Bare de valgte språkene lastes inn og vises i språkvelgeren. Standardspråket lastes alltid.', 'settings_backupDir' => 'Sikkerhetskopi mappe', 'settings_backupDir_desc' => 'Mappe der sikkerhetskopieringsverktøyet lagrer sikkerhetskopier. Hvis denne mappen ikke er angitt eller ikke kan nås, vil sikkerhetskopiene lagres i innholdskatalogen.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache-mappe', 'settings_cacheDir_desc' => 'Hvor forhåndsvisningsbildene er lagret (best å velge en mappe som ikke er tilgjengelig via webserveren)', 'settings_Calendar' => 'Kalender innstillinger', @@ -1921,6 +1923,7 @@ Bruker: [username] 'splash_invalid_searchterm' => 'Ugyldig søkeord', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Link lagt til', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Utklippstavlen flyttet inn i gjeldende mappe', 'splash_move_document' => 'Dokumentet flyttet', 'splash_move_folder' => 'Mappen flyttet', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index c5420ad25..0e6907585 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -1468,6 +1468,8 @@ Name: [username] 'settings_available_languages_desc' => 'Alleen de geselecteerde vertalingen worden beschikbaar in het taal-selectie-menu. De default-taal (EN) wordt altijd geladen.', 'settings_backupDir' => 'Instellingen backupmap', 'settings_backupDir_desc' => 'Instellingen vd backupmap', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'cache directory', 'settings_cacheDir_desc' => 'De map waar de voorbeeldafbeeldingen zijn opgeslagen (het is het beste om te kiezen voor een map die niet toegankelijk voor uw webserver)', 'settings_Calendar' => 'Instellingen van de agenda', @@ -1920,6 +1922,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Ongeldige zoekterm', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Link toegevoegd', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Klembord verplaatst naar de huidige map', 'splash_move_document' => 'Document verplaatst', 'splash_move_folder' => 'Map verplaatst', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 53770f872..2b63f19be 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1693), netixw (84), romi (93), uGn (112) +// Translators: Admin (1694), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => 'Uwierzytelnianie dwuetapowe', @@ -507,7 +507,7 @@ URL: [url]', 'dropfolder_metadata' => '', 'dropupload' => 'Szybki upload', 'drop_files_here' => 'Przeciągnij tu pliki!', -'drop_files_here_or_click' => '', +'drop_files_here_or_click' => 'Upuść plik lub kliknij aby dodać', 'dump_creation' => 'Utworzenie zrzutu bazy danych', 'dump_creation_warning' => 'Ta operacja utworzy plik będący zrzutem zawartości bazy danych. Po utworzeniu plik zrzutu będzie się znajdował w folderze danych na serwerze.', 'dump_list' => 'Istniejące pliki zrzutu', @@ -1399,6 +1399,8 @@ Name: [username] 'settings_available_languages_desc' => 'Tylko wybrane języki zostaną załadowane i będą widoczne w kontrolce wyboru języka. Domyślny język zawsze jest ładowany.', 'settings_backupDir' => 'Lokalizacja kopii zapasowej', 'settings_backupDir_desc' => 'Katalog, w którym narzędzie do tworzenia kopii zapasowych zapisuje kopie zapasowe. Jeśli ten katalog nie jest ustawiony lub nie można uzyskać do niego dostępu, kopie zapasowe zostaną zapisane w katalogu zawartości.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Folder bufora', 'settings_cacheDir_desc' => 'Miejsce przechowywania obrazków podglądu (najlepiej wybrać katalog niedostępny bezpośrednio dla web-serwera).', 'settings_Calendar' => 'Ustawienia kalendarza', @@ -1851,6 +1853,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Nieprawidłowa wartość wyszukiwania', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Dodano link', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schowek został przeniesiony do bieżącego folderu', 'splash_move_document' => 'Dokument został przeniesiony', 'splash_move_folder' => 'Folder został przeniesiony', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 4d6f0ff28..387fe8297 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -1475,6 +1475,8 @@ Nome: [username] 'settings_available_languages_desc' => 'Apenas os idiomas selecionados serão carregados e mostrados no seletor de idioma. O idioma padrão sempre será carregado.', 'settings_backupDir' => 'Diretório de backup', 'settings_backupDir_desc' => 'Diretório onde a ferramenta de backup salva backups. Se esse diretório não estiver definido ou não puder ser acessado, os backups serão salvos no diretório de conteúdo.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Diretório de cache', 'settings_cacheDir_desc' => 'Onde as imagens de visualização são armazenadas (melhor escolher um diretório que não é acessível através de seu web-server)', 'settings_Calendar' => 'Configurações do calendário', @@ -1927,6 +1929,7 @@ Nome: [username] 'splash_invalid_searchterm' => 'Termo de pesquisa inválido', 'splash_invalid_search_service' => '', 'splash_link_document' => 'documento de link inicial', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Área de transferência movida para a pasta corrente', 'splash_move_document' => 'Documento movido', 'splash_move_folder' => 'Pasta movida', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 95c207800..4801f802d 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -1437,6 +1437,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Numai limbile selectate vor fii incarcate la accesare. Limba default va fii mereu incarcata', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Director Cache', 'settings_cacheDir_desc' => 'Unde sunt stocate imaginile de previzualizare (este recomandat sa alegeti un director care nu este accesibil prin intermediul web-server-ului dumneavoastră)', 'settings_Calendar' => 'Setări calendar', @@ -1889,6 +1891,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Termen de căutare invalid', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Clipboard mutat în folderul curent', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 6f2929ddc..2db444d2c 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -1444,6 +1444,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Только выбранные языки будут загружены и доступны для выбора. Язык по умолчанию будет загружен всегда.', 'settings_backupDir' => 'Каталог резервного копирования', 'settings_backupDir_desc' => 'Каталог, в котором средство резервного копирования сохраняет резервные копии. Если этот каталог не установлен или в него отсутствует доступ, то резервные копии будут сохранены в каталоге содержимого.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Каталог кэша', 'settings_cacheDir_desc' => 'Где хранятся эскизы изображений (лучше выбрать каталог недоступный веб-серверу).', 'settings_Calendar' => 'Настройки календаря', @@ -1896,6 +1898,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Неверный поисковый запрос', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Буфер обмена перенесён в текущий каталог', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index a5915ef6f..4d3ec5b54 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -1477,6 +1477,8 @@ Meno: [username] 'settings_available_languages_desc' => 'Only the selected languages will be loaded and show up in the language selector. The default language will always be loaded.', 'settings_backupDir' => 'Zložka na zálohovanie', 'settings_backupDir_desc' => 'Directory where the backup tool saves backups. If this directory is not set or cannot be accessed, then the backups will be saved in the content directory.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Zložka medzipamäte', 'settings_cacheDir_desc' => 'Where the preview images are stored (best to choose a directory that is not accessible through your web-server)', 'settings_Calendar' => 'Nastavenie kalendára', @@ -1929,6 +1931,7 @@ Meno: [username] 'splash_invalid_searchterm' => 'Invalid search term', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schránka sa presunula do aktuálnej zložky', 'splash_move_document' => 'Dokument bol presunutý', 'splash_move_folder' => 'Zložka bola presunutá', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index aa1f8b68a..050785cd5 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -1450,6 +1450,8 @@ Kommentar: [comment]', 'settings_available_languages_desc' => 'Bara de valda språken kommer att laddas och visas i språk väljaren. Det förvalda språket kommer alltid att laddas.', 'settings_backupDir' => 'Sökväg till backuper', 'settings_backupDir_desc' => 'Sökväg till katalogen dit backupverktyget skriver backuper. Om sökväg saknas eller åtkomst inte medges, skrivs backuper till dokumentkatalogen.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache-mapp', 'settings_cacheDir_desc' => 'Här kommer bilder för förhandsvisning att sparas. (Det är bäst att använda en mapp som inte är tillgänglig från webbservern)', 'settings_Calendar' => 'Kalenderinställningar', @@ -1902,6 +1904,7 @@ Kommentar: [comment]', 'splash_invalid_searchterm' => 'Ogiltigt sökord', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Urklipp flyttades till aktuell katalog', 'splash_move_document' => 'Dokumentet flyttat', 'splash_move_folder' => 'Katalogen flyttad', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 9bf9d1bb5..9217c1c7d 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -1416,6 +1416,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Sil seçim kutucuğunda yalnızca seçili diller yüklenecek ve görüntülenecektir.', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache klasörü', 'settings_cacheDir_desc' => 'Önizleme resimlerinin depolanacağı yer (web üzerinden erişilemeyen bir yer tercih etmeniz önerilir.)', 'settings_Calendar' => 'Takvim ayarları', @@ -1868,6 +1870,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Hatalı arama terimi', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Pano mevcut klasöre taşındı', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 92ae8c0ca..1e80aaf1a 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -1437,6 +1437,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Каталог резервних копій', 'settings_backupDir_desc' => 'Каталог, в якому інструмент резервного копіювання зберігає резервні копії. Якщо цей каталог не встановлений або до нього не має доступу, то резервні копії будуть збережені в каталозі вмісту.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Каталог кешу', 'settings_cacheDir_desc' => 'Де зберігаються ескізи зображень (краще вибрати каталог, недоступний веб-серверові).', 'settings_Calendar' => 'Налаштування календаря', @@ -1889,6 +1891,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Невірний пошуковий запит', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Буфер обміну перенесено в поточний каталог', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 7913315c8..7f8c948f2 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -1424,6 +1424,8 @@ URL: [url]', 'settings_available_languages_desc' => '只有选中的语言会被显示在语言选>择框内。默认的语言始终可选。', 'settings_backupDir' => '备份目录', 'settings_backupDir_desc' => '备份保存的目录。如果该目录未设置或无法访问则备份将保存在内容目录中。', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cashe 缓存目录', 'settings_cacheDir_desc' => '预览图像存储的位置(最好选择一个无法通过网络服务器访问的目录)', 'settings_Calendar' => '日历设置', @@ -1876,6 +1878,7 @@ URL: [url]', 'splash_invalid_searchterm' => '无效的搜索项', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '剪贴板移到当前文件夹', 'splash_move_document' => '文档已迁移', 'splash_move_folder' => '文件夹已迁移', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 51d638b7d..c37878e9d 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -1475,6 +1475,8 @@ URL: [url]', 'settings_available_languages_desc' => '僅所選語言會被加載並顯示在語言選擇器中。默認語言將始終被加載。', 'settings_backupDir' => '備份目錄', 'settings_backupDir_desc' => '備份工具保存備份的目錄。如果未設置此目錄或無法訪問該目錄,則備份將保存在內容目錄中。', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '緩存目錄', 'settings_cacheDir_desc' => '預覽圖像的存儲位置(最好選擇無法通過Web服務器訪問的目錄)', 'settings_Calendar' => '日曆設定', @@ -1927,6 +1929,7 @@ URL: [url]', 'splash_invalid_searchterm' => '搜尋字詞無效', 'splash_invalid_search_service' => '', 'splash_link_document' => '鏈接已添加', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '剪貼簿已移至當前文件夾', 'splash_move_document' => '文件已移走', 'splash_move_folder' => '文件夾已移動', From 27b19f5c3ae33221048ddc6f7e21bb89f96714d5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Feb 2023 06:50:15 +0100 Subject: [PATCH 17/64] start version 5.1.30 --- CHANGELOG | 4 ++++ inc/inc.Version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index aa61edd6e..7627a500a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.30 +-------------------------------------------------------------------------------- + -------------------------------------------------------------------------------- Changes in version 5.1.29 -------------------------------------------------------------------------------- diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 552f28df9..2003b0c1a 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { /* {{{ */ - const _number = "5.1.29"; + const _number = "5.1.30"; const _string = "SeedDMS"; function __construct() { From 6fd8d3e7f5f6676a4d32a0803d8612a0775975c2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Feb 2023 07:16:50 +0100 Subject: [PATCH 18/64] log error when execution of command fails --- inc/inc.ClassConversionServiceExec.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassConversionServiceExec.php b/inc/inc.ClassConversionServiceExec.php index 71e530732..b16ec08c3 100644 --- a/inc/inc.ClassConversionServiceExec.php +++ b/inc/inc.ClassConversionServiceExec.php @@ -49,6 +49,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { ); $pipes = array(); + $orgtimeout = $timeout; $timeout += time(); // Putting an 'exec' before the command will not fork the command // and therefore not create any child process. proc_terminate will @@ -84,7 +85,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { fclose($pipes[2]); if ($timeleft <= 0) { proc_terminate($process); - throw new Exception("command timeout on: " . $cmd); + throw new Exception("command timeout after ".$orgtimeout." secs on: " . $cmd); } else { $return_value = proc_close($process); return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value); @@ -169,6 +170,9 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { if($hastempfile) unlink($tmpfile); $this->success = false; + if($this->logger) { + $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with cmd "'.$this->cmd.'" failed: '.$e->getMessage(), PEAR_LOG_ERR); + } return false; } $end = microtime(true); From 6c6b754e526d8c81c7fbbf136bce0de6d2674873 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Feb 2023 10:17:16 +0100 Subject: [PATCH 19/64] remove duplicate class 'alert-warning' in drag&drop box for attachments --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index a229be4a9..fd3c33fc6 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1548,7 +1548,7 @@ $(document).ready( function() { if ($document->getAccessMode($user) >= M_READWRITE){ if($enableDropUpload){ ?> -
html_link('AddFile', array('documentid'=>$documentid), array('class'=>'alert alert-warning'), getMLText('drop_files_here_or_click'), false, true); ?>
+
html_link('AddFile', array('documentid'=>$documentid), array(), getMLText('drop_files_here_or_click'), false, true); ?>
html_link('AddFile', array('documentid'=>$documentid), array('class'=>'btn btn-primary'), getMLText("add"), false, true)."\n"; From d07219a213c01bcdb647f25b074dd6aae16c3934 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 12 Feb 2023 14:33:51 +0100 Subject: [PATCH 20/64] add list of conversion and notification services --- out/out.ConversionServices.php | 47 ++++++++++++++ out/out.NotificationServices.php | 2 +- views/bootstrap/class.ConversionServices.php | 68 ++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 out/out.ConversionServices.php create mode 100644 views/bootstrap/class.ConversionServices.php diff --git a/out/out.ConversionServices.php b/out/out.ConversionServices.php new file mode 100644 index 000000000..53af0f5d5 --- /dev/null +++ b/out/out.ConversionServices.php @@ -0,0 +1,47 @@ +$dms, 'user'=>$user)); +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); +if (!$settings->_enableDebugMode) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} +if (!$accessop->check_view_access($view, $_GET)) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if($view) { + $view->setParam('settings', $settings); + $view->setParam('accessobject', $accessop); + $view->setParam('conversionmgr', $conversionmgr); + $view($_GET); + exit; +} + diff --git a/out/out.NotificationServices.php b/out/out.NotificationServices.php index f985d37ed..0bfdd317a 100644 --- a/out/out.NotificationServices.php +++ b/out/out.NotificationServices.php @@ -29,7 +29,7 @@ require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$settings->_enableDebugMode) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/views/bootstrap/class.ConversionServices.php b/views/bootstrap/class.ConversionServices.php new file mode 100644 index 000000000..6f9635ed1 --- /dev/null +++ b/views/bootstrap/class.ConversionServices.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (C) 2010-2023 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which outputs the html page for Conversion Services view + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2016 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_ConversionServices extends SeedDMS_Theme_Style { + + /** + * List all registered conversion services + * + */ + function list_conversion_services($conversionmgr) { /* {{{ */ + if(!$conversionmgr) + return; + + $allservices = $conversionmgr->getServices(); + + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo ""; + foreach($allservices as $from=>$tos) { + foreach($tos as $to=>$services) { + foreach($services as $service) { + echo ""; + } + } + } + echo ""; + echo "
".getMLText('service_list_from')."".getMLText('service_list_to')."".getMLText('class_name')."".getMLText('service_list_info')."
".$from."".$to."".get_class($service)."".$service->getInfo()."
\n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $conversionmgr = $this->params['conversionmgr']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("list_conversion_services")); + + self::list_conversion_services($conversionmgr); + + $this->contentEnd(); + $this->htmlEndPage(); + } /* }}} */ +} + From 73562364b057b3feefdab8b2fb29f12ddafdf7fd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 12 Feb 2023 14:34:31 +0100 Subject: [PATCH 21/64] add debug menu in admin tools --- views/bootstrap/class.Bootstrap.php | 12 ++++++++++++ views/bootstrap4/class.Bootstrap4.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 295715ef5..d42a25bc6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -929,6 +929,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info')); } + if ($settings->_enableDebugMode) { + if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) { + $menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug')); + if ($accessobject->check_view_access('Hooks')) + $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks')); + if ($accessobject->check_view_access('NotificationServices')) + $menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services')); + if ($accessobject->check_view_access('ConversionServices')) + $menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services')); + } + } + /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass * the menuitems to each single hook. Hence, the last hook will win. diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index fc812ef38..dfe2eab70 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -917,6 +917,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info')); } + if ($settings->_enableDebugMode) { + if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) { + $menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug')); + if ($accessobject->check_view_access('Hooks')) + $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks')); + if ($accessobject->check_view_access('NotificationServices')) + $menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services')); + if ($accessobject->check_view_access('ConversionServices')) + $menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services')); + } + } + /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass * the menuitems to each single hook. Hence, the last hook will win. From d45f050e46c6c1483eb67b423de132e4afb84d6e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Feb 2023 08:27:37 +0100 Subject: [PATCH 22/64] conversion from pdf to png replaces alpha channel with white --- CHANGELOG | 1 + inc/inc.ClassConversionServicePdfToImage.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7627a500a..d396fba11 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ -------------------------------------------------------------------------------- Changes in version 5.1.30 -------------------------------------------------------------------------------- +- conversion from pdf to png replaces alpha channel with white -------------------------------------------------------------------------------- Changes in version 5.1.29 diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php index 349565232..4a7f1ce2e 100644 --- a/inc/inc.ClassConversionServicePdfToImage.php +++ b/inc/inc.ClassConversionServicePdfToImage.php @@ -64,6 +64,10 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase if($imagick->readImage($infile.'['.$page.']')) { if(!empty($params['width'])) $imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0); + /* Remove alpha channel and set to white */ + $imagick->setImageBackgroundColor('white'); + $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); + $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); $imagick->setImageFormat('png'); $end = microtime(true); if($this->logger) { From 7c973d9f3755a989e151c57a98e92d6b47254377 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 11:35:19 +0100 Subject: [PATCH 23/64] fix inclusion of php files --- op/op.AddTransmittal.php | 2 +- op/op.ReceiptDocument.php | 3 +-- op/op.ReviseDocument.php | 3 +-- op/op.SetRecipients.php | 2 +- op/op.SetRevisors.php | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/op/op.AddTransmittal.php b/op/op.AddTransmittal.php index 9909fd9e4..2ffce61f7 100644 --- a/op/op.AddTransmittal.php +++ b/op/op.AddTransmittal.php @@ -19,8 +19,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); diff --git a/op/op.ReceiptDocument.php b/op/op.ReceiptDocument.php index 5bdfb8a5c..e90181ce5 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -19,13 +19,12 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.DBInit.php"); -include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index 1a4254be5..6f2d0de22 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -19,13 +19,12 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.DBInit.php"); -include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); diff --git a/op/op.SetRecipients.php b/op/op.SetRecipients.php index 69d77fa45..ea8880224 100644 --- a/op/op.SetRecipients.php +++ b/op/op.SetRecipients.php @@ -20,8 +20,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); diff --git a/op/op.SetRevisors.php b/op/op.SetRevisors.php index 4c6b9568b..294ba0619 100644 --- a/op/op.SetRevisors.php +++ b/op/op.SetRevisors.php @@ -20,8 +20,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); From bcd09778039c11e3781eb1ad3d8507821a8d5a69 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 11:36:07 +0100 Subject: [PATCH 24/64] fix inclusion of php files --- op/op.AddToClipboard.php | 2 +- op/op.ChangePassword.php | 1 - op/op.Logout.php | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.AddToClipboard.php b/op/op.AddToClipboard.php index 27d33d62d..a2c2fe4b3 100644 --- a/op/op.AddToClipboard.php +++ b/op/op.AddToClipboard.php @@ -22,10 +22,10 @@ include("../inc/inc.Settings.php"); include("../inc/inc.Utils.php"); include("../inc/inc.LogInit.php"); -include("../inc/inc.DBInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); +include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); diff --git a/op/op.ChangePassword.php b/op/op.ChangePassword.php index 1c92b28ca..9c386635e 100644 --- a/op/op.ChangePassword.php +++ b/op/op.ChangePassword.php @@ -27,7 +27,6 @@ include("../inc/inc.Extension.php"); include("../inc/inc.ClassSession.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); -require_once("../inc/inc.ClassAccessOperation.php"); function _printMessage($heading, $message) { diff --git a/op/op.Logout.php b/op/op.Logout.php index 06af4bcc9..70d089139 100644 --- a/op/op.Logout.php +++ b/op/op.Logout.php @@ -21,6 +21,7 @@ include("../inc/inc.Settings.php"); include("../inc/inc.Utils.php"); include("../inc/inc.LogInit.php"); +include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.ClassSession.php"); From 0b7d3cad2d08df739d3fe9992b9f4302841e39f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 17:28:37 +0100 Subject: [PATCH 25/64] add changes for 6.0.23 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 61c7db25e..8e4553e1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 6.0.22 -------------------------------------------------------------------------------- - merge changes up to 5.1.28 +- fix setting recipients and revisors -------------------------------------------------------------------------------- Changes in version 6.0.21 From 513343c89a59eac7e8ee39036c0bca1584580e1f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 17:29:29 +0100 Subject: [PATCH 26/64] add changes for 6.0.23 --- CHANGELOG | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8e4553e1f..8201046a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,12 @@ +-------------------------------------------------------------------------------- + Changes in version 6.0.23 +-------------------------------------------------------------------------------- +- fix setting recipients and revisors + -------------------------------------------------------------------------------- Changes in version 6.0.22 -------------------------------------------------------------------------------- - merge changes up to 5.1.28 -- fix setting recipients and revisors -------------------------------------------------------------------------------- Changes in version 6.0.21 From 3e5497a7fdedb4c82f24459bd6e99e959923d236 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 06:57:42 +0100 Subject: [PATCH 27/64] add more error checking when including extensions.php --- inc/inc.ClassExtensionMgr.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index ae2e036c1..f409b6a51 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -122,9 +122,10 @@ class SeedDMS_Extension_Mgr { if(!file_exists($this->getExtensionsConfFile())) { $this->createExtensionConf(); } - include($this->getExtensionsConfFile()); - if(!empty($EXT_CONF)) { - $this->extconf = $EXT_CONF; + if(@include($this->getExtensionsConfFile())) { + if(!empty($EXT_CONF)) { + $this->extconf = $EXT_CONF; + } } } } /* }}} */ From bea6ab35a897ee98584dc53171fd0cce57507098 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 12:42:05 +0100 Subject: [PATCH 28/64] add changes in 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index d396fba11..732125b18 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 5.1.30 -------------------------------------------------------------------------------- - conversion from pdf to png replaces alpha channel with white +- add list of conversion services in debug menu of admin tool -------------------------------------------------------------------------------- Changes in version 5.1.29 From 4e08744631471a26ea490cbc1e2025415a87ff19 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 16:10:59 +0100 Subject: [PATCH 29/64] addDirSep() can check for arbitrary chars at end of string --- inc/inc.Utils.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 25d3a0ecb..ace755d68 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -663,16 +663,19 @@ function get_extension($mimetype) { /* {{{ */ } /* }}} */ /** - * Adds a missing front slash to a string + * Adds a missing directory separator (or any other char) to a string * * This function is used for making sure a directory name has a - * trailing directory separator + * trailing directory separator. It can also be used to add + * any other char at the end of a string, e.g. an URL which must + * end in '/' (DIRECTORY_SEPARATOR wouldn't be right in that case, + * because it is '\' on Windows) */ -function addDirSep($str) { /* {{{ */ +function addDirSep($str, $chr=DIRECTORY_SEPARATOR) { /* {{{ */ if(trim($str) == '') return ''; - if(substr(trim($str), -1, 1) != DIRECTORY_SEPARATOR) - return trim($str).DIRECTORY_SEPARATOR; + if(substr(trim($str), -1, 1) != $chr) + return trim($str).$chr; else return trim($str); } /* }}} */ From dc868bd83b5988350da90f7ccfc3e5205572e29b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2023 15:49:04 +0100 Subject: [PATCH 30/64] getBaseUrl() checks for HTTP_X_FORWARDED_HOST and HTTP_X_FORWARDED_PROTO --- inc/inc.Utils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index ace755d68..b33a24199 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -803,12 +803,12 @@ function getBaseUrl() { /* {{{ */ if(!empty($settings->_baseUrl)) return $settings->_baseUrl; - if(isset($_SERVER['X-Forwarded-Host'])) - $host = $_SERVER['X-Forwarded-Host']; + if(isset($_SERVER['HTTP_X_FORWARDED_HOST'])) + $host = $_SERVER['HTTP_X_FORWARDED_HOST']; else $host = $_SERVER['HTTP_HOST']; - if(isset($_SERVER['X-Forwarded-Proto'])) - $ssl = $_SERVER['X-Forwarded-Proto'] == 'https'; + if(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) + $ssl = $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; else $ssl = (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)); From 535de29e7d890bc53fce9a99409cf50b80deaca6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2023 15:49:55 +0100 Subject: [PATCH 31/64] check return value of postInitDMS --- inc/inc.DBInit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php index 9949c5e9f..2662bb2a0 100644 --- a/inc/inc.DBInit.php +++ b/inc/inc.DBInit.php @@ -61,7 +61,11 @@ $dms->setMaxDirID($settings->_maxDirID); if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) { if (method_exists($hookObj, 'postInitDMS')) { - $hookObj->postInitDMS(array('dms'=>$dms, 'settings'=>$settings, 'logger'=>$logger)); + $ret = $hookObj->postInitDMS(array('dms'=>$dms, 'settings'=>$settings, 'logger'=>$logger)); + if($ret === false) { + echo "Fatal error in postInitDMS Hook. No way to recover."; + exit; + } } } } From 2ffe130666a798c9494dcb634f3faba39e0d3f72 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:05:55 +0100 Subject: [PATCH 32/64] set theme to bootstrap4, fulltext engine to sqlitefts, turn on theme selector --- conf/settings.xml.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/settings.xml.template b/conf/settings.xml.template index 01704a1ce..84c4b9437 100644 --- a/conf/settings.xml.template +++ b/conf/settings.xml.template @@ -15,7 +15,7 @@ footNote = "SeedDMS free document management system - www.seeddms.org" printDisclaimer = "true" language = "en_GB" - theme = "bootstrap" + theme = "bootstrap4" previewWidthList = "40" previewWidthDetail = "100" onePageMode="true" @@ -60,8 +60,8 @@ enableDropUpload = "false" enableRecursiveCount = "false" maxRecursiveCount = "0" - enableThemeSelector = "false" - fullSearchEngine = "lucene" + enableThemeSelector = "true" + fullSearchEngine = "sqlitefts" sortFoldersDefault = "u" defaultDocPosition = "end" defaultFolderPosition = "end" From 44d043ef21afde8033d83d7bd90efd6cce028f6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:06:43 +0100 Subject: [PATCH 33/64] add fold marks --- inc/inc.ClassFulltextService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/inc.ClassFulltextService.php b/inc/inc.ClassFulltextService.php index 23309cf6c..131a4f747 100644 --- a/inc/inc.ClassFulltextService.php +++ b/inc/inc.ClassFulltextService.php @@ -181,14 +181,14 @@ class SeedDMS_FulltextService { * document if its content is below the configured size. * @return object indexed Document ready for passing to the indexer */ - public function IndexedDocument($object, $forceupdate=false) { + public function IndexedDocument($object, $forceupdate=false) { /* {{{ */ if($object->isType('document')) $nocontent = $object->getLatestContent()->getFileSize() > $this->maxsize && $this->maxsize && !$forceupdate; else $nocontent = true; $convcallback = $this->getConversionWithPreviewCallback(); return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $convcallback /*$this->conversionmgr ? $this->conversionmgr : $this->converters*/, $nocontent, $this->cmdtimeout); - } + } /* }}} */ /** * Returns an instance of the indexer @@ -198,7 +198,7 @@ class SeedDMS_FulltextService { * * @return object instance of class specified in 'Indexer' */ - public function Indexer($recreate=false) { + public function Indexer($recreate=false) { /* {{{ */ if($this->index) return $this->index; @@ -210,9 +210,9 @@ class SeedDMS_FulltextService { return $this->index; } else return null; - } + } /* }}} */ - public function Search() { + public function Search() { /* {{{ */ if($this->search) return $this->search; if($this->services[0]) { @@ -221,7 +221,7 @@ class SeedDMS_FulltextService { } else { return null; } - } + } /* }}} */ } From a7b00ae22add12e10641d8ae582db6c9777767be Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:07:22 +0100 Subject: [PATCH 34/64] add new key 'attrcallback' to configuration of fulltext engine --- inc/inc.FulltextInit.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 450086571..53cfec9a5 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -1,5 +1,11 @@ getAllAttributeDefinitions(); + }; +} + $fulltextservice = null; if($settings->_enableFullSearch) { require_once("inc.ClassFulltextService.php"); @@ -10,7 +16,10 @@ if($settings->_enableFullSearch) { 'Indexer' => 'SeedDMS_SQLiteFTS_Indexer', 'Search' => 'SeedDMS_SQLiteFTS_Search', 'IndexedDocument' => 'SeedDMS_SQLiteFTS_IndexedDocument', - 'Conf' => array('indexdir' => $settings->_luceneDir) + 'Conf' => array( + 'indexdir' => $settings->_luceneDir, + 'attrcallback' => getAttributesCallback($dms) + ) ); $fulltextservice->addService('sqlitefts', $indexconf); From e21e301ea3048e79d79e1645e2a188f371c44ccd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 08:30:34 +0100 Subject: [PATCH 35/64] use chosen select for custom attributes --- CHANGELOG | 1 + views/bootstrap4/class.Bootstrap4.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 732125b18..92d1cd25d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ -------------------------------------------------------------------------------- - conversion from pdf to png replaces alpha channel with white - add list of conversion services in debug menu of admin tool +- use chosen select for custom attributes -------------------------------------------------------------------------------- Changes in version 5.1.29 diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index dfe2eab70..58fb5b981 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1994,7 +1994,7 @@ $(document).ready(function() { default: if($valueset = $attrdef->getValueSetAsArray()) { $content .= "getId()."]\" value=\"\"/>"; - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]"; if($attrdef->getMultipleValues() || $alwaysmultiple) { $content .= "[]\" multiple"; } else { From 9e6e13a041118983a2568bed3d9266283e092377 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 09:59:45 +0100 Subject: [PATCH 36/64] add method getContrastColor() --- inc/inc.ClassViewCommon.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 05021234f..04e31cd10 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -355,4 +355,12 @@ class SeedDMS_View_Common { } echo "};\n"; } /* }}} */ + + public static function getContrastColor($hexcolor) { /* {{{ */ + $r = hexdec(substr($hexcolor, 1, 2)); + $g = hexdec(substr($hexcolor, 3, 2)); + $b = hexdec(substr($hexcolor, 5, 2)); + $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + return ($yiq >= 148) ? '000000' : 'ffffff'; + } /* }}} */ } From 05c0f296fca7d3d0e0903edd4e2bfa351589b843 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:00:31 +0100 Subject: [PATCH 37/64] place button with color of category in front of title in select menu --- views/bootstrap/class.Categories.php | 3 ++- views/bootstrap/styles/application.js | 2 ++ views/bootstrap4/styles/application.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 356ed03db..53d4fa377 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -150,7 +150,8 @@ $(document).ready( function() { $options[] = array("-1", getMLText("choose_category")); $options[] = array("0", getMLText("new_document_category")); foreach ($categories as $category) { - $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents')))); + $color = substr(md5($category->getName()), 0, 6); + $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-before-title', " "), array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents')))); } $this->formField( null, //getMLText("selection"), diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index 23ef17802..1eb3d2243 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -12,6 +12,8 @@ chzn_template_func = function (state) { if($(state.element).data('warning')) warning = $(state.element).data('warning')+''; /* make sure it is a string */ var html = ''; + if($(state.element).data('before-title')) + html += $(state.element).data('before-title')+''; if($(state.element).data('icon-before')) html += ' '; html += state.text.replace(/ '; html += state.text.replace(/ Date: Wed, 22 Feb 2023 10:01:06 +0100 Subject: [PATCH 38/64] color category batch --- views/bootstrap/class.Bootstrap.php | 6 ++++-- views/bootstrap4/class.Bootstrap4.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d42a25bc6..a5bd72e03 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -3166,8 +3166,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } if($categories = $document->getCategories()) { $content .= "
"; - foreach($categories as $category) - $content .= "".$category->getName()." "; + foreach($categories as $category) { + $color = substr(md5($category->getName()), 0, 6); + $content .= "".$category->getName()." "; + } } if(!empty($extracontent['bottom_title'])) $content .= $extracontent['bottom_title']; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 58fb5b981..a4107fa80 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -3244,8 +3244,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } if($categories = $document->getCategories()) { $content .= "
"; - foreach($categories as $category) - $content .= "".$category->getName()." "; + foreach($categories as $category) { + $color = substr(md5($category->getName()), 0, 6); + $content .= "".$category->getName()." "; + } } if(!empty($extracontent['bottom_title'])) $content .= $extracontent['bottom_title']; From 6301e9228e08e7034410fd1321edeae575edff8f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:02:31 +0100 Subject: [PATCH 39/64] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 92d1cd25d..19def9fbf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ - conversion from pdf to png replaces alpha channel with white - add list of conversion services in debug menu of admin tool - use chosen select for custom attributes +- color category (use first 6 chars of md5(category name) as hex color) -------------------------------------------------------------------------------- Changes in version 5.1.29 From 352446e9d8a7845b1ca5a4c51ee76904c3afab15 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:33:06 +0100 Subject: [PATCH 40/64] create missing preview images in category or attribute manager --- out/out.AttributeMgr.php | 1 + out/out.Categories.php | 1 + views/bootstrap/class.AttributeMgr.php | 6 ++++-- views/bootstrap/class.Categories.php | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/out/out.AttributeMgr.php b/out/out.AttributeMgr.php index f769f6900..fba8266df 100644 --- a/out/out.AttributeMgr.php +++ b/out/out.AttributeMgr.php @@ -47,6 +47,7 @@ if(isset($_GET['attrdefid']) && $_GET['attrdefid']) { } if($view) { + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('accessobject', $accessop); $view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax $view->setParam('attrdefs', $attrdefs); diff --git a/out/out.Categories.php b/out/out.Categories.php index ea5462135..e1ab501dd 100644 --- a/out/out.Categories.php +++ b/out/out.Categories.php @@ -46,6 +46,7 @@ if(isset($_GET['categoryid']) && $_GET['categoryid']) { } if($view) { + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('categories', $categories); $view->setParam('selcategory', $selcat); $view->setParam('accessobject', $accessop); diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index dc9e09cd9..097069356 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -67,6 +67,7 @@ $(document).ready( function() { function info() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $conversionmgr = $this->params['conversionmgr']; $attrdefs = $this->params['attrdefs']; $selattrdef = $this->params['selattrdef']; $cachedir = $this->params['cachedir']; @@ -134,13 +135,15 @@ $(document).ready( function() { } } + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); if($res['folders'] || $res['docs']) { print $this->folderListHeader(); print "\n"; foreach($res['folders'] as $subFolder) { echo $this->folderListRow($subFolder); } - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach($res['docs'] as $document) { echo $this->documentListRow($document, $previewer); } @@ -156,7 +159,6 @@ $(document).ready( function() { print "".getMLText("status")."\n"; print "".getMLText("action")."\n"; print "\n\n\n"; - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach($res['contents'] as $content) { $doc = $content->getDocument(); echo $this->documentListRow($doc, $previewer); diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 53d4fa377..b623a3c10 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -51,6 +51,7 @@ $(document).ready( function() { function info() { /* {{{ */ $dms = $this->params['dms']; $selcat = $this->params['selcategory']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $timeout = $this->params['timeout']; @@ -68,6 +69,8 @@ $(document).ready( function() { print $this->folderListHeader(); print "\n"; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); foreach($documents as $doc) { echo $this->documentListRow($doc, $previewer); } From b5be1c849052ca2582689b490a64c24811edb372 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:33:31 +0100 Subject: [PATCH 41/64] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 19def9fbf..a399113f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ - add list of conversion services in debug menu of admin tool - use chosen select for custom attributes - color category (use first 6 chars of md5(category name) as hex color) +- create missing preview images in category or attribute manager -------------------------------------------------------------------------------- Changes in version 5.1.29 From d8f79b846ec004e48dff4ed1ac74fb6b3c359af9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 07:17:17 +0100 Subject: [PATCH 42/64] pass correct depth in callback of SeedDMS_FolderTree --- inc/inc.Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index b33a24199..35c9df96d 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -1129,7 +1129,7 @@ class SeedDMS_FolderTree { /* {{{ */ $iter = new \SeedDMS\Core\RecursiveFolderIterator($folder); $iter2 = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::SELF_FIRST); foreach($iter2 as $ff) { - call_user_func($callback, $ff, $iter2->getDepth()); + call_user_func($callback, $ff, $iter2->getDepth()+1); // echo $ff->getID().': '.$ff->getFolderPathPlain().'-'.$ff->getName()."
"; } } /* }}} */ From e2d94d2e567f0302c0177a89648480ac9bc2aef7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 07:18:14 +0100 Subject: [PATCH 43/64] depth is now one less then before --- views/bootstrap/class.Indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php index 5549d0f44..ffd3fafad 100644 --- a/views/bootstrap/class.Indexer.php +++ b/views/bootstrap/class.Indexer.php @@ -37,7 +37,7 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */ public function process($folder, $depth=0) { /* {{{ */ $lucenesearch = $this->fulltextservice->Search(); - echo "
".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain()); + echo "
".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain()); /* If the document wasn't indexed before then just add it */ if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) { echo " getID()."\" class=\"indexme indexstatus\" data-docid=\"F".$folder->getID()."\">".getMLText('index_waiting').""; From 04210265c03e338187bd12364ee2c2aef81a79f4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 08:24:11 +0100 Subject: [PATCH 44/64] add translations for conversion services --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/el_GR/lang.inc | 4 ++++ languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hr_HR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/id_ID/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/ko_KR/lang.inc | 4 ++++ languages/lo_LA/lang.inc | 4 ++++ languages/nb_NO/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/uk_UA/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 4 ++++ languages/zh_TW/lang.inc | 4 ++++ 27 files changed, 110 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 53291a814..d458b4f2a 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -845,6 +845,7 @@ URL: [url]', 'link_to_version' => 'رابط الإصدار', 'list_access_rights' => 'لائحة حقوق الدخول', 'list_contains_no_access_docs' => 'هذه الائحة لا تحتوي على مستندات للدخول', +'list_conversion_services' => '', 'list_hooks' => 'لائحة الدمج', 'list_notification_services' => '', 'list_tasks' => 'لائحة المهمات', @@ -1370,6 +1371,9 @@ URL: [url]', 'seq_keep' => 'حافظ على المرتبة', 'seq_start' => 'اول مرتبة', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'صفوف', 'setDateFromFile' => 'وضع تاريخ من الملف', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index b72bf52db..4c8906d39 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -774,6 +774,7 @@ $text = array( 'link_to_version' => '', 'list_access_rights' => 'Списък на права', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1233,6 +1234,9 @@ $text = array( 'seq_keep' => 'Съхрани позицията', 'seq_start' => 'Първа позиция', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 376c8c35b..a4d0af160 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -779,6 +779,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Llista tots els tipus d\'accés...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1238,6 +1239,9 @@ URL: [url]', 'seq_keep' => 'Mantenir posició', 'seq_start' => 'Primera posició', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index ddbfe9d0a..ec6645bb7 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Provázat k verzi', 'list_access_rights' => 'Seznam všech přístupových práv ...', 'list_contains_no_access_docs' => 'Seznam obsahuje více dokumentů, ke kterým nemáte přístup a které se nezobrazují.', +'list_conversion_services' => '', 'list_hooks' => 'Seznam hooks', 'list_notification_services' => '', 'list_tasks' => 'Seznam úkolů', @@ -1442,6 +1443,9 @@ Jméno: [username] 'seq_keep' => 'Ponechat pozici', 'seq_start' => 'První pozice', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'seance', 'setDateFromFile' => '', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index b05acb3b3..c1c58c46e 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (3158), dgrutsch (22) +// Translators: Admin (3162), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -1019,6 +1019,7 @@ URL: [url]

', 'link_to_version' => 'An Version hängen', 'list_access_rights' => 'Alle Zugriffsrechte auflisten ...', 'list_contains_no_access_docs' => 'Die Liste enthält weitere Dokumente auf die Sie keinen Zugriff haben und deshalb nicht angezeigt werden.', +'list_conversion_services' => 'Liste der Konvertierer', 'list_hooks' => 'Liste der interne Aufrufe', 'list_notification_services' => 'Liste der Benachrichtigungsdienste', 'list_tasks' => 'Tasks auflisten', @@ -1774,6 +1775,9 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'seq_keep' => 'Beibehalten', 'seq_start' => 'An den Anfang', 'service_has_filter' => 'Service hat Filter', +'service_list_from' => 'Von', +'service_list_info' => 'Information', +'service_list_to' => 'Nach', 'service_name' => 'Service-Name', 'sessions' => 'Benutzer Online', 'setDateFromFile' => 'Datum von importierter Datei übernehmen', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 6f4ba01f6..88d675215 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -774,6 +774,7 @@ $text = array( 'link_to_version' => '', 'list_access_rights' => 'Εμφάνισε όλα τα δικαιώματα πρόσβασης', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1244,6 +1245,9 @@ URL: [url]', 'seq_keep' => 'Διατήρηση θέσης', 'seq_start' => 'Τοποθέτηση στην αρχή', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index d71f837fd..90cf775dc 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (2253), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2257), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -1020,6 +1020,7 @@ URL: [url]

', 'link_to_version' => 'Attach to version', 'list_access_rights' => 'List all access rights ...', 'list_contains_no_access_docs' => 'The list contains more documents you have no access to and are not displayed.', +'list_conversion_services' => 'List of conversion services', 'list_hooks' => 'List of hooks', 'list_notification_services' => 'List of notification services', 'list_tasks' => 'List tasks', @@ -1777,6 +1778,9 @@ If you did not receive a password, please use the password forgotten function on 'seq_keep' => 'Keep Position', 'seq_start' => 'First position', 'service_has_filter' => 'Service has filter', +'service_list_from' => 'From', +'service_list_info' => 'Information', +'service_list_to' => 'To', 'service_name' => 'Name of service', 'sessions' => 'Users online', 'setDateFromFile' => 'Take over date from imported file', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index f4ef83a82..0db0189ac 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -864,6 +864,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Listar los derechos de acceso', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Mis bloques', 'list_notification_services' => '', 'list_tasks' => '', @@ -1397,6 +1398,9 @@ URL: [url]', 'seq_keep' => 'Mantener posición', 'seq_start' => 'Primera posición', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => 'Obtiene la fecha del archivo importado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 0d92ba8fa..dfddd6c87 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1006,6 +1006,7 @@ URL : [url]

', 'link_to_version' => 'Version', 'list_access_rights' => 'Liste des droits d’accès…', 'list_contains_no_access_docs' => 'La liste contient des documents auxquels vous n’avez pas accès et qui ne sont donc pas affichés.', +'list_conversion_services' => '', 'list_hooks' => 'Liste des appels internes', 'list_notification_services' => '', 'list_tasks' => 'Liste des tâches', @@ -1760,6 +1761,9 @@ Nom : [username] 'seq_keep' => 'Conserver la position', 'seq_start' => 'Première position', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Utilisateurs en ligne', 'setDateFromFile' => 'Reprendre la date du fichier importé', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 8b4537ec4..4448d5beb 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -857,6 +857,7 @@ Internet poveznica: [url]', 'link_to_version' => '', 'list_access_rights' => 'Izlistaj sve dozvole pristupa', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Kuke za popise', 'list_notification_services' => '', 'list_tasks' => '', @@ -1406,6 +1407,9 @@ Internet poveznica: [url]', 'seq_keep' => 'Zadrži poziciju', 'seq_start' => 'Na početak', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 33020bc6a..21128b2c3 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -852,6 +852,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Összes jogosultság felsorolása...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Hook lista', 'list_notification_services' => '', 'list_tasks' => '', @@ -1384,6 +1385,9 @@ URL: [url]', 'seq_keep' => 'Pozci megtartßsa', 'seq_start' => 'Elejé‰re', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index e350f55ee..2cd68e6c2 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -908,6 +908,7 @@ URL: [url]

', 'link_to_version' => 'Lampirkan ke versi', 'list_access_rights' => 'Daftar semua hak akses ...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Daftar hooks', 'list_notification_services' => '', 'list_tasks' => 'Daftar tasks', @@ -1458,6 +1459,9 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'seq_keep' => 'Keep Position', 'seq_start' => 'Posisi awal', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Pengguna Online', 'setDateFromFile' => 'Ambil alih tanggal dari file yang diimpor', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 4ca0d5e17..371d91ee9 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -862,6 +862,7 @@ URL: [url]', 'link_to_version' => 'Collega alla versione', 'list_access_rights' => 'Elenca tutti i diritti di accesso...', 'list_contains_no_access_docs' => 'L\'elenco contiene più documenti ai quali non si ha accesso e non vengono visualizzati.', +'list_conversion_services' => '', 'list_hooks' => 'Elenco hooks', 'list_notification_services' => '', 'list_tasks' => 'Elenco attività', @@ -1433,6 +1434,9 @@ Name: [username] 'seq_keep' => 'Mantieni la posizione', 'seq_start' => 'Prima posizione', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Utenti online', 'setDateFromFile' => 'Prende la data dal file importato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 854106a58..250bf6186 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -858,6 +858,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => '모든 접근 권한 나열', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1400,6 +1401,9 @@ URL : [url]', 'seq_keep' => '위치 유지', 'seq_start' => '첫 번째 위치', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index d91d7c9ee..f01c0a2bf 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -855,6 +855,7 @@ URL: [url]', 'link_to_version' => 'ແນບໄປພ້ອມກັບເວີຊັນ', 'list_access_rights' => 'ສະແດງສິດທິການເຂົ້າເຖິງທັງໝົດ ...', 'list_contains_no_access_docs' => 'ລິດລາຍການປະກອບດ້ວຍເອກະສານເພີ່ມເຕີມທີ່ເຈົ້າບໍ່ສາມາດເຂົ້າເຖິງໄດ້ ແລະບໍ່ສະແດງ', +'list_conversion_services' => '', 'list_hooks' => 'ລາບການ hooks', 'list_notification_services' => '', 'list_tasks' => '', @@ -1426,6 +1427,9 @@ URL: [url]', 'seq_keep' => 'ເກັບຕຳແໜ່ງໄວ້', 'seq_start' => 'ອັນດັບທຳອິດ', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'ຜູ້ໄຊ້ອອນລາຍ', 'setDateFromFile' => '', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index b233e49fa..3421abc6b 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Vedlegg til versjonen', 'list_access_rights' => 'Liste over alle rettigheter...', 'list_contains_no_access_docs' => 'Listen inneholder flere dokumenter du ikke har tilgang til og ikke vises.', +'list_conversion_services' => '', 'list_hooks' => 'Liste hooks', 'list_notification_services' => '', 'list_tasks' => 'Liste oppgaver', @@ -1439,6 +1440,9 @@ Bruker: [username] 'seq_keep' => 'Hold posisjon', 'seq_start' => 'Første possisjon', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Brukere innlogget', 'setDateFromFile' => 'Overta dato fra importert fil', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 0e6907585..68073098b 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -869,6 +869,7 @@ URL: [url]', 'link_to_version' => 'Bijlage(n) bij versie', 'list_access_rights' => 'Toegangsrechten', 'list_contains_no_access_docs' => 'Geen toegankelijke documenten', +'list_conversion_services' => '', 'list_hooks' => 'Hooks', 'list_notification_services' => '', 'list_tasks' => 'Taken', @@ -1438,6 +1439,9 @@ Name: [username] 'seq_keep' => 'Behoud Positie', 'seq_start' => 'Eerste positie', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'sessies', 'setDateFromFile' => 'Gebruik de datum van de geïmporteerde file', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 2b63f19be..dbcecf4ba 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -845,6 +845,7 @@ URL: [url]', 'link_to_version' => 'Załącz do wersji', 'list_access_rights' => 'Pokaż uprawnienia dostępu', 'list_contains_no_access_docs' => 'Lista zawiera więcej dokumentów, do których nie masz dostępu i nie są wyświetlane.', +'list_conversion_services' => '', 'list_hooks' => 'Lista błędów', 'list_notification_services' => '', 'list_tasks' => 'Lista zadań', @@ -1369,6 +1370,9 @@ Name: [username] 'seq_keep' => 'Na tej samej pozycji', 'seq_start' => 'Na początku', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Sesja', 'setDateFromFile' => 'Przejmij datę z importowanego pliku', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 387fe8297..2e6f43bb1 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Anexar à versão', 'list_access_rights' => 'Listar todos os direitos de acesso...', 'list_contains_no_access_docs' => 'A lista contém mais documentos aos quais você não tem acesso e não são exibidos.', +'list_conversion_services' => '', 'list_hooks' => 'Listar ganchos', 'list_notification_services' => '', 'list_tasks' => 'Listar tarefas', @@ -1445,6 +1446,9 @@ Nome: [username] 'seq_keep' => 'Manter posição', 'seq_start' => 'Primeira posição', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Online', 'setDateFromFile' => 'Assumir a data do arquivo importado', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 4801f802d..a9b60a086 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Listeaza toate drepturile de acces', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1407,6 +1408,9 @@ URL: [url]', 'seq_keep' => 'Păstrați poziția', 'seq_start' => 'Prima poziție', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 2db444d2c..e0eadabba 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Показать все права доступа', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Список хуков', 'list_notification_services' => '', 'list_tasks' => '', @@ -1414,6 +1415,9 @@ URL: [url]', 'seq_keep' => 'Не изменять', 'seq_start' => 'В начале', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 4d3ec5b54..d363354d7 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Pripojiť k verzii', 'list_access_rights' => 'Zobraziť všetky prístupové práva', 'list_contains_no_access_docs' => 'Zoznam obsahuje viac dokumentov, ku ktorým nemáte prístup a nie sú zobrazené.', +'list_conversion_services' => '', 'list_hooks' => 'List hooks', 'list_notification_services' => '', 'list_tasks' => 'List tasks', @@ -1447,6 +1448,9 @@ Meno: [username] 'seq_keep' => 'Ponechať pozíciu', 'seq_start' => 'Prvá pozícia', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Používatelia online', 'setDateFromFile' => 'Prebrať dátumy z importovaných súborov', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 050785cd5..ba5ad1304 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -863,6 +863,7 @@ URL: [url]', 'link_to_version' => 'Kopppla till version', 'list_access_rights' => 'Lista alla rättigheter...', 'list_contains_no_access_docs' => 'Listan innehåller fler dokument som inte visas då du saknar rättigheter till dessa.', +'list_conversion_services' => '', 'list_hooks' => 'Lista hooks', 'list_notification_services' => '', 'list_tasks' => '', @@ -1420,6 +1421,9 @@ Kommentar: [comment]', 'seq_keep' => 'Behåll positionen', 'seq_start' => 'Första positionen', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Användare online', 'setDateFromFile' => '', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 9217c1c7d..68c534c53 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -851,6 +851,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Tüm erişim haklarini listele', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1386,6 +1387,9 @@ URL: [url]', 'seq_keep' => 'Sırayı Koru', 'seq_start' => 'İlk sıra', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 1e80aaf1a..611add06c 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Повний список прав...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1407,6 +1408,9 @@ URL: [url]', 'seq_keep' => 'Не змінювати', 'seq_start' => 'На початку', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 7f8c948f2..d9d1d7fa0 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -859,6 +859,7 @@ URL: [url]', 'link_to_version' => '附加到版本', 'list_access_rights' => '列出所有的访问权限', 'list_contains_no_access_docs' => '这个列表包含了更多你无法访问的文件也没有显示出来。', +'list_conversion_services' => '', 'list_hooks' => '钩子列表', 'list_notification_services' => '', 'list_tasks' => '任务列表', @@ -1394,6 +1395,9 @@ URL: [url]', 'seq_keep' => '当前', 'seq_start' => '首位', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '在线用户', 'setDateFromFile' => '导入文件接收日期', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index c37878e9d..0f65fc46e 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => '附加到版本', 'list_access_rights' => '列出權限', 'list_contains_no_access_docs' => '該列表包含更多您無法訪問且不會顯示的文檔。', +'list_conversion_services' => '', 'list_hooks' => '掛勾列表', 'list_notification_services' => '', 'list_tasks' => '工作列表', @@ -1445,6 +1446,9 @@ URL: [url]', 'seq_keep' => '當前', 'seq_start' => '首位', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '在線用戶', 'setDateFromFile' => '從導入的文件接管日期', From 4bfdc9cbf54a45135c064cc057cf9fcbe065a34e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2023 13:26:40 +0100 Subject: [PATCH 45/64] add selection of document in extension configuration --- views/bootstrap/class.Settings.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index d7e3cec6a..d931031a5 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -671,6 +671,9 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) case "folders": $this->formField(null, $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getFolder($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; + case "documents": + $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); + break; } } break; From df6a2e79bcc5d5855e2e5b7aa097b7840e0504bf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2023 14:20:33 +0100 Subject: [PATCH 46/64] adjust call of getDocumentChooserHtml() for 6.0.x --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 42ead127f..0e9a39cc7 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -705,7 +705,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) $this->formField(null, $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getFolder($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; case "documents": - $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); + $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; } } From 245092bb100e297ece879b0594e07295e212a24c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Feb 2023 19:36:14 +0100 Subject: [PATCH 47/64] fix get smtp parameters --- utils/expireddocs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/expireddocs.php b/utils/expireddocs.php index 4c5dc2f3c..3f16aa1fd 100644 --- a/utils/expireddocs.php +++ b/utils/expireddocs.php @@ -277,10 +277,10 @@ foreach($users as $user) { $mail_params = array(); if($settings->_smtpServer) { $mail_params['host'] = $settings->_smtpServer; - if($settings->smtpPort) { + if($settings->_smtpPort) { $mail_params['port'] = $settings->_smtpPort; } - if($settings->smtpUser) { + if($settings->_smtpUser) { $mail_params['auth'] = true; $mail_params['username'] = $settings->_smtpUser; $mail_params['password'] = $settings->_smtpPassword; From 737e69876dd520797bf5be90df57f1e5367a3ef1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 10:44:25 +0100 Subject: [PATCH 48/64] fix nasty php error --- inc/inc.Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index e26137cb4..f7d7f5026 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -380,7 +380,7 @@ function utf8_basename($path, $suffix='') { /* {{{ */ * @return string valid file name */ function getFilenameByDocname($content) { /* {{{ */ - if(is_string) { + if(is_string($content)) { $filename = $content; } else { $document = $content->getDocument(); From 13a0646698fff30359b7639f89c258585608362a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 11:31:31 +0100 Subject: [PATCH 49/64] formField() evals allow_empty --- views/bootstrap/class.Bootstrap.php | 4 ++++ views/bootstrap4/class.Bootstrap4.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index a5bd72e03..1f9489f0e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1138,17 +1138,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } elseif(is_array($value)) { switch($value['element']) { case 'select': + $allowempty = empty($value['allow_empty']) ? false : $value['allow_empty']; echo '"; if(isset($value['options']) && is_array($value['options'])) { + if($allowempty) + echo ""; foreach($value['options'] as $val) { if(is_string($val)) { echo ''; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index a4107fa80..91f86b6a6 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1122,17 +1122,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } elseif(is_array($value)) { switch($value['element']) { case 'select': + $allowempty = empty($value['allow_empty']) ? false : $value['allow_empty']; echo '"; if(isset($value['options']) && is_array($value['options'])) { + if($allowempty) + echo ""; foreach($value['options'] as $val) { if(is_string($val)) { echo ''; From 258914e884d6589d158cb13b6448d4515e79a17d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 12:54:56 +0100 Subject: [PATCH 50/64] override action to 'show' when showing error msg --- inc/inc.ClassUI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index e29b69523..d3d174460 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -186,6 +186,10 @@ class UI extends UI_Default { global $theme, $dms, $user, $settings; $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); $view = UI::factory($theme, 'ErrorDlg'); + $request = $view->getParam('request'); + if($request) { + $request->query->set('action', 'show'); + } $view->setParam('dms', $dms); $view->setParam('user', $user); $view->setParam('accessobject', $accessop); From 3d170ad18ccfa7aaee97d6d50e2d8450b602e424 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 13:09:33 +0100 Subject: [PATCH 51/64] add converter to png for videos --- doc/README.Converters | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/README.Converters b/doc/README.Converters index 730466e72..001b503d2 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -122,3 +122,7 @@ application/csv application/vnd.wordperfect unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- 'png:%o' +video/webm +video/mp4 + This will take 12th frame of a video and converts into a png + convert -resize %wx '%f[12]' 'png:%o' From 05b95bd0ed915af68b1232f2b3aae6d84532ccd7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 13:10:16 +0100 Subject: [PATCH 52/64] note about required ffmpeg --- doc/README.Converters | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/README.Converters b/doc/README.Converters index 001b503d2..508bf46ae 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -124,5 +124,7 @@ application/vnd.wordperfect video/webm video/mp4 - This will take 12th frame of a video and converts into a png + This will take 12th frame of a video and converts into a png. It requires + ffmpeg to be installed. + convert -resize %wx '%f[12]' 'png:%o' From 198dc8c73053e379e143a1e165c281b900b23420 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Mar 2023 12:16:41 +0100 Subject: [PATCH 53/64] use propper language names --- develop/transcomp.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/develop/transcomp.php b/develop/transcomp.php index e24d75fad..205530395 100644 --- a/develop/transcomp.php +++ b/develop/transcomp.php @@ -1,7 +1,7 @@ $value) { if(!isset($allkeys[$key])) { @@ -45,8 +45,8 @@ foreach(array('English', 'German', 'Italian', 'Slovak', 'Czech') as $lang) { exit; $fpout = fopen('php://stdout', 'w'); -foreach(array_keys($langarr['English']) as $key) { - $data = array($key, $langarr['English'][$key], $langarr['German'][$key]); +foreach(array_keys($langarr['en_GB']) as $key) { + $data = array($key, $langarr['en_GB'][$key], $langarr['de_DE'][$key]); fputcsv($fpout, $data); } ?> From 97778d3e2bac8da23339d7c0565ecf22ace4983f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Mar 2023 09:55:08 +0100 Subject: [PATCH 54/64] use two column layout (left for check in, right for cancel checkout) --- views/bootstrap/class.CheckInDocument.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 42df6c10f..154311499 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -79,7 +79,6 @@ $(document).ready(function() { $this->globalNavigation($folder); $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - $this->contentHeading(getMLText("checkin_document")); if ($document->isLocked()) { @@ -120,7 +119,10 @@ $(document).ready(function() { } $checkoutinfo = $document->getCheckOutInfo(); + $this->rowStart(); if($checkoutstatus == 0) { + $this->columnStart(6); + $this->contentHeading(getMLText("checkin_document")); $latestContent = $document->getLatestContent(); $reviewStatus = $latestContent->getReviewStatus(); @@ -134,13 +136,13 @@ $(document).ready(function() { } } - $this->contentContainerStart(); ?>
contentContainerStart(); if(!$nodocumentformfields || !in_array('version_comment', $nodocumentformfields)) { $this->formField( getMLText("comment"), @@ -664,18 +666,21 @@ $(document).ready(function() { ); } + $this->contentContainerEnd(); $this->formSubmit(getMLText('checkin_document')); ?>
contentContainerEnd(); + $this->columnEnd(); + $this->columnStart(6); if(!empty($settings->_enableCancelCheckout)) { - $this->contentContainerStart(); + $this->contentHeading(getMLText("cancel_checkout_document")); $this->warningMsg(getMLText('cancel_checkout_warning')); ?>
contentContainerStart(); echo createHiddenFieldWithKey('cancelcheckout'); $this->formField( getMLText("checkout_cancel_confirm"), @@ -686,13 +691,15 @@ $(document).ready(function() { 'value'=>1 ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('cancel_checkout'), '', '', 'danger'); ?>
contentContainerEnd(); } + $this->columnEnd(); } else { + $this->columnStart(12); ?>
@@ -701,7 +708,9 @@ $(document).ready(function() { formSubmit(getMLText('cancel_checkout'),'','','danger');?>
columnEnd(); } + $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 39026ef4a8e1d37458b60d6db289fc7627df5837 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 3 Mar 2023 16:14:01 +0100 Subject: [PATCH 55/64] new algo for contrast color based on lightness --- inc/inc.ClassViewCommon.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 04e31cd10..63d9f276d 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -360,7 +360,12 @@ class SeedDMS_View_Common { $r = hexdec(substr($hexcolor, 1, 2)); $g = hexdec(substr($hexcolor, 3, 2)); $b = hexdec(substr($hexcolor, 5, 2)); - $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - return ($yiq >= 148) ? '000000' : 'ffffff'; + if(0) { + $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + return ($yiq >= 148) ? '000000' : 'ffffff'; + } else { + $l = (max($r, max($g, $b)) + min($r, min($g, $b)))/2; + return ($l > 128) ? '000000' : 'ffffff'; + } } /* }}} */ } From 9e36d82873421debc17e491b5fb1cd26aaa34324 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Mar 2023 09:04:58 +0100 Subject: [PATCH 56/64] initial support for attributes in full text search --- out/out.Search.php | 7 ++++- views/bootstrap/class.Search.php | 51 ++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index 99cdb822d..73af0259c 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -161,6 +161,11 @@ if($fullsearch) { else $record_type = array(); + if (isset($_GET["attributes"])) + $attributes = $_GET["attributes"]; + else + $attributes = array(); + // Check to see if the search has been restricted to a particular sub-tree in // the folder hierarchy. $startFolder = null; @@ -193,7 +198,7 @@ if($fullsearch) { if($index) { // $terms = $index->terms($_GET['query']); $lucenesearch = $fulltextservice->Search(); - $searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1)))); + $searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder, 'attributes'=>$attributes), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1)))); if($searchresult === false) { $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm'))); $dcount = 0; diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 72e70b053..d2da9d06d 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -877,6 +877,13 @@ function typeahead() { /* {{{ */ $option[] = true; $options[] = $option; } + } elseif(substr($facetname, 0, 5) == 'attr_') { + foreach($values as $v=>$c) { + $option = array($v, $v.' ('.$c.')'); + if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) + $option[] = true; + $options[] = $option; + } } else { foreach($values as $v=>$c) { $option = array($v, $v.' ('.$c.')'); @@ -885,18 +892,38 @@ function typeahead() { /* {{{ */ $options[] = $option; } } - $this->formField( - getMLText($facetname), - array( - 'element'=>'select', - 'id'=>$facetname, - 'name'=>$facetname."[]", - 'class'=>'chzn-select', - 'attributes'=>array(array('data-placeholder', getMLText('select_'.$facetname)), array('data-allow-clear', 'true')), - 'options'=>$options, - 'multiple'=>$multiple - ) - ); + if(substr($facetname, 0, 5) == 'attr_') { + $tmp = explode('_', $facetname); + if($attrdef = $dms->getAttributeDefinition($tmp[1])) + $dispname = $attrdef->getName(); + else + $dispname = getMLText($facetname); + $this->formField( + $dispname, + array( + 'element'=>'select', + 'id'=>$facetname, + 'name'=>'attributes['.$facetname.'][]', + 'class'=>'chzn-select', + 'attributes'=>array(array('data-placeholder', $dispname), array('data-allow-clear', 'true')), + 'options'=>$options, + 'multiple'=>$multiple + ) + ); + } else { + $this->formField( + getMLText($facetname), + array( + 'element'=>'select', + 'id'=>$facetname, + 'name'=>$facetname."[]", + 'class'=>'chzn-select', + 'attributes'=>array(array('data-placeholder', getMLText('select_'.$facetname)), array('data-allow-clear', 'true')), + 'options'=>$options, + 'multiple'=>$multiple + ) + ); + } } } $this->contentContainerEnd(); From 0e712c1554558468fa5d13564b503aab58f4f436 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Mar 2023 10:09:05 +0100 Subject: [PATCH 57/64] empty password in csv file will not override an existing password --- op/op.ImportUsers.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/op/op.ImportUsers.php b/op/op.ImportUsers.php index af34d607c..515a2e28c 100644 --- a/op/op.ImportUsers.php +++ b/op/op.ImportUsers.php @@ -45,7 +45,8 @@ function renderBooleanData($colname, $objdata) { /* {{{ */ } /* }}} */ function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */ - $objdata['passenc'] = seed_pass_hash($coldata); + /* Setting 'passenc' to null will not update the password */ + $objdata['passenc'] = $coldata ? seed_pass_hash($coldata) : null; return $objdata; } /* }}} */ @@ -245,7 +246,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) { if($makeupdate) $eu->setEmail($u['email']); } - if(isset($u['passenc']) && $u['passenc'] != $eu->getPwd()) { + if(isset($u['passenc']) && !is_null($u['passenc']) && $u['passenc'] != $eu->getPwd()) { $log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Encrypted password of user updated. '".$u['passenc']."' != '".$eu->getPwd()."'"); if($makeupdate) $eu->setPwd($u['passenc']); From 742929002b9dcc3d3bdf41ab4c96b9e25b646576 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 6 Mar 2023 10:03:28 +0100 Subject: [PATCH 58/64] show number of occurances in subtitle of options --- views/bootstrap/class.Search.php | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index d2da9d06d..5fd7ded68 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -854,9 +854,12 @@ function typeahead() { /* {{{ */ foreach($values as $v=>$c) { $uu = $dms->getUserByLogin($v); if($uu) { - $option = array($uu->getId(), $v.' ('.$c.')'); + $option = array($uu->getId(), $v/*.' ('.$c.')'*/); if(isset(${$facetname}) && in_array($uu->getId(), ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } @@ -864,35 +867,48 @@ function typeahead() { /* {{{ */ foreach($values as $v=>$c) { $cat = $dms->getDocumentCategoryByName($v); if($cat) { - $option = array($cat->getId(), $v.' ('.$c.')'); + $option = array($cat->getId(), $v/*.' ('.$c.')'*/); if(isset(${$facetname}) && in_array($cat->getId(), ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } } elseif($facetname == 'status') { foreach($values as $v=>$c) { - $option = array($v, getOverallStatusText($v).' ('.$c.')'); - if(isset(${$facetname}) && in_array($v, ${$facetname})) - $option[] = true; - $options[] = $option; + $option = array($v, getOverallStatusText($v)/*.' ('.$c.')'*/); + if(isset(${$facetname}) && in_array($v, ${$facetname})) + $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); + $options[] = $option; } } elseif(substr($facetname, 0, 5) == 'attr_') { foreach($values as $v=>$c) { - $option = array($v, $v.' ('.$c.')'); - if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) - $option[] = true; - $options[] = $option; + $option = array($v, $v/*.' ('.$c.')'*/); + if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) + $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); + $options[] = $option; } } else { foreach($values as $v=>$c) { $option = array($v, $v.' ('.$c.')'); if(isset(${$facetname}) && in_array($v, ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } if(substr($facetname, 0, 5) == 'attr_') { + if($options) { $tmp = explode('_', $facetname); if($attrdef = $dms->getAttributeDefinition($tmp[1])) $dispname = $attrdef->getName(); @@ -910,6 +926,7 @@ function typeahead() { /* {{{ */ 'multiple'=>$multiple ) ); + } } else { $this->formField( getMLText($facetname), From 5d2ace6a14a3cd719af729661a180576e1f34ae0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2023 08:10:12 +0100 Subject: [PATCH 59/64] take over attribute validation from op.UpdateDocument.php --- op/op.CheckInDocument.php | 43 ++++++++------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index 47853f199..b870fc2ee 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -192,42 +192,17 @@ else foreach($attributes as $attrdefid=>$attribute) { $attrdef = $dms->getAttributeDefinition($attrdefid); if($attribute) { - if(!$attrdef->validate($attribute)) { - switch($attrdef->getValidationError()) { - case 5: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_email", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); - break; - case 4: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_url", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); - break; - case 3: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_no_regex_match", array("attrname"=>$attrdef->getName(), "value"=>$attribute, "regex"=>$attrdef->getRegex()))); - break; - case 2: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); - break; - case 1: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); - break; - default: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); - } + switch($attrdef->getType()) { + case SeedDMS_Core_AttributeDefinition::type_date: + $attribute = date('Y-m-d', makeTsFromDate($attribute)); + break; } - /* - if($attrdef->getRegex()) { - if(!preg_match($attrdef->getRegex(), $attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("attr_no_regex_match")); - } + if(!$attrdef->validate($attribute, null, true)) { + $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); } - if(is_array($attribute)) { - if($attrdef->getMinValues() > count($attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); - } - if($attrdef->getMaxValues() && $attrdef->getMaxValues() < count($attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); - } - } - */ + } elseif($attrdef->getMinValues() > 0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); } } } else { From 2c5f661108193b80a61586108d34c03ae0b6db74 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2023 17:58:27 +0100 Subject: [PATCH 60/64] support README of extension in different languages --- views/bootstrap/class.ExtensionMgr.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index db44c3928..10fde5e5c 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -178,6 +178,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { function readme() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $session = $this->params['session']; $extdir = $this->params['extdir']; $extmgr = $this->params['extmgr']; $extname = $this->params['extname']; @@ -185,9 +186,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { if(isset($extconf[$extname])) { $extconf = $extconf[$extname]; - if(file_exists($extdir."/".$extname."/README.md")) { -// echo '
'.file_get_contents($extdir."/".$extname."/README.md")."
"; - $Parsedown = new Parsedown(); + $Parsedown = new Parsedown(); + if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md")) { + echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.".$session->getLanguage().".md")); + } elseif(file_exists($extdir."/".$extname."/README.md")) { echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.md")); } } @@ -197,6 +199,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { $dms = $this->params['dms']; $user = $this->params['user']; $settings = $this->params['settings']; + $session = $this->params['session']; $httproot = $this->params['httproot']; $extmgr = $this->params['extmgr']; $extdir = $this->params['extdir']; @@ -237,7 +240,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ""; echo ""; echo "
"; - if(file_exists($extdir."/".$extname."/README.md")) { + if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md") || file_exists($extdir."/".$extname."/README.md")) { echo $this->getModalBoxLink(array('target'=>'extensionReadme', 'remote'=>'out.ExtensionMgr.php?action=readme&extensionname='.$extname, 'class'=>'', 'title'=>'', 'attributes'=>array('title'=>getMLText('show_extension_readme')))); } if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) { From 2e818d54266a87a548aaeca40651dd84cfaffaf9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2023 17:59:32 +0100 Subject: [PATCH 61/64] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a399113f2..865472f70 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - use chosen select for custom attributes - color category (use first 6 chars of md5(category name) as hex color) - create missing preview images in category or attribute manager +- support README of extension in different languages -------------------------------------------------------------------------------- Changes in version 5.1.29 From 63adb75fbcc4bdc11a1823080f1dc694ed8da8aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 18:57:17 +0100 Subject: [PATCH 62/64] fix regression when setting review by individual --- controllers/class.ReviewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/class.ReviewDocument.php b/controllers/class.ReviewDocument.php index 8d8bea56f..685114306 100644 --- a/controllers/class.ReviewDocument.php +++ b/controllers/class.ReviewDocument.php @@ -45,7 +45,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { if($result === null) { if ($reviewtype == "ind") { - $reviewLogID > $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file); + $reviewLogID = $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file); if($reviewLogID === false || 0 > $reviewLogID) { $this->error = 1; $this->errormsg = "review_update_failed"; From da992a7bdd16dc7886e011b8791c2c7dd8302d6f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 18:59:02 +0100 Subject: [PATCH 63/64] create 8-bit png instead of 16-bit --- inc/inc.ClassConversionServicePdfToImage.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php index 4a7f1ce2e..c7b178765 100644 --- a/inc/inc.ClassConversionServicePdfToImage.php +++ b/inc/inc.ClassConversionServicePdfToImage.php @@ -65,9 +65,14 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase if(!empty($params['width'])) $imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0); /* Remove alpha channel and set to white */ - $imagick->setImageBackgroundColor('white'); - $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); - $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); + $imagick->setImageBackgroundColor('white'); + /* Setting the color-type and bit-depth produces much smaller images + * because the default depth appears to be 16 bit + */ + $imagick->setOption('png:color-type', 6); + $imagick->setOption('png:bit-depth', 8); + $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); + $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); $imagick->setImageFormat('png'); $end = microtime(true); if($this->logger) { From 37f64d0a3e38b96e2cb307e23a26e3063dd018b9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 20:54:42 +0100 Subject: [PATCH 64/64] add menu item for adding folder/document to clipboard --- views/bootstrap/class.Bootstrap.php | 10 +++++++++- views/bootstrap/class.Clipboard.php | 2 +- views/bootstrap4/class.Bootstrap4.php | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 1f9489f0e..daead2a8e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -651,6 +651,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; + $enableClipboard = $this->params['enableclipboard']; $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { self::showNavigationBar(array()); @@ -689,7 +690,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('FolderNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify')); } - if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } + if ($accessobject->check_view_access('Indexer') && $this->params['enablefullsearch']) { $menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder')); } @@ -711,6 +715,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function documentNavigationBar($document) { /* {{{ */ $accessobject = $this->params['accessobject']; + $enableClipboard = $this->params['enableclipboard']; $accessMode = $document->getAccessMode($this->params['user']); $docid=".php?documentid=" . $document->getID(); echo "params['settings']->_httpRoot."out/out.ViewDocument". $docid ."\" class=\"brand\">".getMLText("document")."\n"; @@ -754,6 +759,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('DocumentNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($accessobject->check_view_access('TransferDocument')) { $menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document')); } diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index f1c97fa97..0bbc0c7b0 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -42,7 +42,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style { */ public function menuClipboard() { /* {{{ */ $clipboard = $this->params['session']->getClipboard(); - if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { + if (/*$this->params['user']->isGuest() ||*/ (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { return ''; } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 91f86b6a6..3902711ea 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -656,6 +656,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; + $enableClipboard = $this->params['enableclipboard']; $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { self::showNavigationBar(array()); @@ -692,6 +693,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('FolderNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { $menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder')); } @@ -712,6 +716,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function documentNavigationBar($document) { /* {{{ */ $accessobject = $this->params['accessobject']; + $enableClipboard = $this->params['enableclipboard']; $accessMode = $document->getAccessMode($this->params['user']); $docid=".php?documentid=" . $document->getID(); $menuitems = array(); @@ -753,6 +758,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('DocumentNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($accessobject->check_view_access('TransferDocument')) { $menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document')); }