From f8b78c7212091c5e5da0033f49f7dc5d3ce0db10 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 1 Jul 2022 09:50:37 +0200 Subject: [PATCH 1/6] include vendor/autoload.php after setting include path --- inc/inc.Settings.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php index 3014536ce..a21c8b57a 100644 --- a/inc/inc.Settings.php +++ b/inc/inc.Settings.php @@ -64,9 +64,6 @@ ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('inc if(!empty($settings->_extraPath)) { ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path')); } -/* composer is installed in pear directory, but install tool does not need it */ -if(!defined("SEEDDMS_INSTALL")) - require_once $settings->_rootDir.'../pear/vendor/autoload.php'; if(isset($settings->_maxExecutionTime)) { if (php_sapi_name() !== "cli") { @@ -98,3 +95,7 @@ ini_set('include_path', $settings->_rootDir. PATH_SEPARATOR .ini_get('include_pa * relative to it. */ ini_set('include_path', $settings->_rootDir.'../pear'. PATH_SEPARATOR .ini_get('include_path')); + +/* composer is installed in pear directory, but install tool does not need it */ +if(!defined("SEEDDMS_INSTALL")) + require_once 'vendor/autoload.php'; From 0799f908f1485355fdabea4c5f5be263f6095b33 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 1 Jul 2022 09:51:30 +0200 Subject: [PATCH 2/6] remove old get_magic_quotes code --- inc/inc.Settings.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php index a21c8b57a..83688f255 100644 --- a/inc/inc.Settings.php +++ b/inc/inc.Settings.php @@ -71,22 +71,6 @@ if(isset($settings->_maxExecutionTime)) { } } -if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { - $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); - while (list($key, $val) = each($process)) { - foreach ($val as $k => $v) { - unset($process[$key][$k]); - if (is_array($v)) { - $process[$key][stripslashes($k)] = $v; - $process[] = &$process[$key][stripslashes($k)]; - } else { - $process[$key][stripslashes($k)] = stripslashes($v); - } - } - } - unset($process); -} - /* Add root Dir. Needed because the view classes are included * relative to it. */ From dd8f1b7a8e7da4f9275b74f1c589faa4ca3c2d61 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 6 Jul 2022 09:15:12 +0200 Subject: [PATCH 3/6] fix SeedDMS_Core_DMS::addAttributeDefinition() when objtype is 0 --- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- SeedDMS_Core/package.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 991f21f01..de4e37330 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2703,7 +2703,7 @@ class SeedDMS_Core_DMS { if (is_object($this->getAttributeDefinitionByName($name))) { return false; } - if(!$objtype) + if($objtype < SeedDMS_Core_AttributeDefinition::objtype_all || $objtype > SeedDMS_Core_AttributeDefinition::objtype_documentcontent) return false; if(!$type) return false; diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 76b616b57..e0077eb64 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,6 +24,7 @@ GPL License +fix SeedDMS_Core_DMS::addAttributeDefinition() when objtype is 0 From d47e2377bbbd232a1b42524f67d117009b781435 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 6 Jul 2022 09:16:47 +0200 Subject: [PATCH 4/6] do not explode() attrtype and objtype, if an array is needed it can be set in conf.php --- 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 e6e1103c5..f325ab812 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -615,7 +615,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) case "attributedefinitions": $objtype = empty($conf['objtype']) ? 0 : $conf['objtype']; $attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype']; - $recs = $dms->getAllAttributeDefinitions(explode(',', $objtype), explode(',', $attrtype)); + $recs = $dms->getAllAttributeDefinitions($objtype, $attrtype); if($recs) { echo "