mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 06:27:15 +00:00
trim values in value set when retrieving it
This commit is contained in:
parent
3e505cabc9
commit
f1bd74426e
|
@ -553,7 +553,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
||||||
*/
|
*/
|
||||||
function getValueSetAsArray() { /* {{{ */
|
function getValueSetAsArray() { /* {{{ */
|
||||||
if(strlen($this->_valueset) > 1)
|
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
|
else
|
||||||
return array();
|
return array();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -569,7 +569,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
||||||
if(strlen($this->_valueset) > 1) {
|
if(strlen($this->_valueset) > 1) {
|
||||||
$tmp = explode($this->_valueset[0], substr($this->_valueset, 1));
|
$tmp = explode($this->_valueset[0], substr($this->_valueset, 1));
|
||||||
if(isset($tmp[$ind]))
|
if(isset($tmp[$ind]))
|
||||||
return $tmp[$ind];
|
return trim($tmp[$ind]);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user