mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
clean up valueset in addAttributeDefintion()
will remove all spaces from each value in the valueset
This commit is contained in:
parent
e0880e8ebd
commit
9bd1c111c8
|
@ -1745,6 +1745,12 @@ class SeedDMS_Core_DMS {
|
|||
}
|
||||
if(!$type)
|
||||
return false;
|
||||
if(trim($valueset)) {
|
||||
$valuesetarr = array_map('trim', explode($valueset[0], substr($valueset, 1)));
|
||||
$valueset = $valueset[0].implode($valueset[0], $valuesetarr);
|
||||
} else {
|
||||
$valueset = '';
|
||||
}
|
||||
$queryStr = "INSERT INTO tblAttributeDefinitions (name, objtype, type, multiple, minvalues, maxvalues, valueset, regex) VALUES (".$this->db->qstr($name).", ".intval($objtype).", ".intval($type).", ".intval($multiple).", ".intval($minvalues).", ".intval($maxvalues).", ".$this->db->qstr($valueset).", ".$this->db->qstr($regex).")";
|
||||
$res = $this->db->getResult($queryStr);
|
||||
if (!$res)
|
||||
|
|
Loading…
Reference in New Issue
Block a user