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

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