init value set, separator, trim value set in setValue()

This commit is contained in:
Uwe Steinmann 2021-09-16 16:14:51 +02:00
parent 4aa4556df8
commit 95b4bb9d22

View File

@ -754,8 +754,9 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
$tmp[] = str_replace('"', '""', $value);
}
$valuesetstr = implode(",", $tmp);
*/
if(trim($valueset)) {
*/
$valueset = trim($valueset);
if($valueset) {
$valuesetarr = array_map('trim', explode($valueset[0], substr($valueset, 1)));
$valuesetstr = $valueset[0].implode($valueset[0], $valuesetarr);
} else {
@ -769,8 +770,8 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
if (!$res)
return false;
$this->_valueset = $valueset;
$this->_separator = substr($valueset, 0, 1);
$this->_valueset = $valuesetstr;
$this->_separator = substr($valuesetstr, 0, 1);
return true;
} /* }}} */