mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
fix import of object type of attribute definitions
This commit is contained in:
parent
62eb18f6a3
commit
d1829dfe29
|
@ -203,7 +203,8 @@ function insert_attributedefinition($attrdef) { /* {{{ */
|
|||
$logger->info("Attribute definition already exists");
|
||||
} else {
|
||||
if(in_array('attributedefinitions', $sections)) {
|
||||
if(!$newAttrdef = $dms->addAttributeDefinition($attrdef['attributes']['name'], $attrdef['objecttype'], $attrdef['attributes']['type'], $attrdef['attributes']['multiple'], $attrdef['attributes']['minvalues'], $attrdef['attributes']['maxvalues'], $attrdef['attributes']['valueset'], $attrdef['attributes']['regex'])) {
|
||||
$objtype = ($attrdef['objecttype'] == 'folder' ? SeedDMS_Core_AttributeDefinition::objtype_folder : ($attrdef['objecttype'] == 'document' ? SeedDMS_Core_AttributeDefinition::objtype_document : ($attrdef['objecttype'] == 'documentcontent' ? SeedDMS_Core_AttributeDefinition::objtype_documentcontent : 0)));
|
||||
if(!$newAttrdef = $dms->addAttributeDefinition($attrdef['attributes']['name'], $objtype, $attrdef['attributes']['type'], $attrdef['attributes']['multiple'], $attrdef['attributes']['minvalues'], $attrdef['attributes']['maxvalues'], $attrdef['attributes']['valueset'], $attrdef['attributes']['regex'])) {
|
||||
$logger->err("Could not add attribute definition");
|
||||
$logger->debug($dms->getDB()->getErrorMsg());
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user