mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
add name of attribute def. in error msg when setting an attribute
This commit is contained in:
parent
1ac232476a
commit
08415039ca
|
@ -1669,7 +1669,7 @@ class RestapiController { /* {{{ */
|
|||
$doc = $dms->getDocument($args['id']);
|
||||
if($doc && $attrdef) {
|
||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_document) {
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for documents', 'data'=>''), 409);
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for documents', 'data'=>''), 409);
|
||||
}
|
||||
|
||||
$params = $request->getParsedBody();
|
||||
|
@ -1726,7 +1726,7 @@ class RestapiController { /* {{{ */
|
|||
$version = $doc->getContentByVersion($args['version']);
|
||||
if($doc && $attrdef && $version) {
|
||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for document versions', 'data'=>''), 409);
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for document versions', 'data'=>''), 409);
|
||||
}
|
||||
|
||||
$params = $request->getParsedBody();
|
||||
|
@ -1780,7 +1780,7 @@ class RestapiController { /* {{{ */
|
|||
$obj = $dms->getFolder($args['id']);
|
||||
if($obj && $attrdef) {
|
||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_folder) {
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for folders', 'data'=>''), 409);
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for folders', 'data'=>''), 409);
|
||||
}
|
||||
|
||||
$params = $request->getParsedBody();
|
||||
|
|
Loading…
Reference in New Issue
Block a user