mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
getValueSetSeparator() returns ',' for type_user and type_group
This commit is contained in:
parent
96d89a76b7
commit
ce2ee995fc
|
@ -168,6 +168,7 @@ class SeedDMS_Core_Attribute { /* {{{ */
|
|||
|
||||
if(is_array($values)) {
|
||||
if($values) {
|
||||
$vsep = $this->getValueSetSeparator();
|
||||
if($valueset) {
|
||||
$error = false;
|
||||
foreach($values as $v) {
|
||||
|
@ -176,9 +177,9 @@ class SeedDMS_Core_Attribute { /* {{{ */
|
|||
if($error)
|
||||
return false;
|
||||
$valuesetstr = $this->_attrdef->getValueSet();
|
||||
$value = $valuesetstr[0].implode($valuesetstr[0], $values);
|
||||
$value = $vsep.implode($vsep, $values);
|
||||
} else {
|
||||
$value = ','.implode(',', $values);
|
||||
$value = $vsep.implode($vsep, $values);
|
||||
}
|
||||
} else {
|
||||
$value = '';
|
||||
|
@ -649,10 +650,16 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
|||
* @return string separator or an empty string if a value set is not set
|
||||
*/
|
||||
function getValueSetSeparator() { /* {{{ */
|
||||
if(strlen($this->_valueset) > 1)
|
||||
if(strlen($this->_valueset) > 1) {
|
||||
return $this->_valueset[0];
|
||||
else
|
||||
} elseif($this->_multiple) {
|
||||
if($this->_type == SeedDMS_Core_AttributeDefinition::type_user || $this->_type == SeedDMS_Core_AttributeDefinition::type_group)
|
||||
return ',';
|
||||
else
|
||||
return '';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user