mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
e77bec4419
|
@ -54,7 +54,10 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- fix adding new workflows
|
||||
- fix moving documents/folders via drag&drop in Edge (Closes #286)
|
||||
- upate folder tree after moving a document/folder with drag&drop (Closes #288)
|
||||
- update folder tree after moving a document/folder with drag&drop (Closes #288)
|
||||
- trim each value of a value sets of attribute definitions bevor saving
|
||||
- assign role 'user' instead of 'admin' to accounts automatically created during
|
||||
ldap authentication
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.29
|
||||
|
|
|
@ -589,6 +589,20 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
|||
return $this->_valueset;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get the separator used for the value set
|
||||
*
|
||||
* This is the first char of the value set string.
|
||||
*
|
||||
* @return string separator or an empty string if a value set is not set
|
||||
*/
|
||||
function getValueSetSeparator() { /* {{{ */
|
||||
if(strlen($this->_valueset) > 1)
|
||||
return $this->_valueset[0];
|
||||
else
|
||||
return '';
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get the whole value set as an array
|
||||
*
|
||||
|
@ -638,7 +652,12 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
|||
}
|
||||
$valuesetstr = implode(",", $tmp);
|
||||
*/
|
||||
$valuesetstr = $valueset;
|
||||
if(trim($valueset)) {
|
||||
$valuesetarr = array_map('trim', explode($valueset[0], substr($valueset, 1)));
|
||||
$valuesetstr = $valueset[0].implode($valueset[0], $valuesetarr);
|
||||
} else {
|
||||
$valuesetstr = '';
|
||||
}
|
||||
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
|
|
|
@ -1698,6 +1698,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)
|
||||
|
|
|
@ -222,7 +222,7 @@ $(document).ready( function() {
|
|||
</td>
|
||||
<td>
|
||||
<?php if($attrdef && strlen($attrdef->getValueSet()) > 30) { ?>
|
||||
<textarea name="valueset" rows="5"><?php echo $attrdef ? $attrdef->getValueSet() : '' ?></textarea>
|
||||
<textarea name="valueset" rows="5"><?php echo ($attrdef && $attrdef->getValueSet()) ? $attrdef->getValueSetSeparator().implode("\n".$attrdef->getValueSetSeparator(), $attrdef->getValueSetAsArray()) : '' ?></textarea>
|
||||
<?php } else { ?>
|
||||
<input type="text" value="<?php echo $attrdef ? $attrdef->getValueSet() : '' ?>" name="valueset" />
|
||||
<?php } ?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user