trim values in value set when retrieving it

This commit is contained in:
Uwe Steinmann 2016-10-06 08:01:57 +02:00
parent 3e505cabc9
commit f1bd74426e

View File

@ -553,7 +553,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
*/
function getValueSetAsArray() { /* {{{ */
if(strlen($this->_valueset) > 1)
return explode($this->_valueset[0], substr($this->_valueset, 1));
return array_map('trim', explode($this->_valueset[0], substr($this->_valueset, 1)));
else
return array();
} /* }}} */
@ -569,7 +569,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
if(strlen($this->_valueset) > 1) {
$tmp = explode($this->_valueset[0], substr($this->_valueset, 1));
if(isset($tmp[$ind]))
return $tmp[$ind];
return trim($tmp[$ind]);
else
return false;
} else