mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +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']);
|
$doc = $dms->getDocument($args['id']);
|
||||||
if($doc && $attrdef) {
|
if($doc && $attrdef) {
|
||||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_document) {
|
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();
|
$params = $request->getParsedBody();
|
||||||
|
@ -1726,7 +1726,7 @@ class RestapiController { /* {{{ */
|
||||||
$version = $doc->getContentByVersion($args['version']);
|
$version = $doc->getContentByVersion($args['version']);
|
||||||
if($doc && $attrdef && $version) {
|
if($doc && $attrdef && $version) {
|
||||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
|
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();
|
$params = $request->getParsedBody();
|
||||||
|
@ -1780,7 +1780,7 @@ class RestapiController { /* {{{ */
|
||||||
$obj = $dms->getFolder($args['id']);
|
$obj = $dms->getFolder($args['id']);
|
||||||
if($obj && $attrdef) {
|
if($obj && $attrdef) {
|
||||||
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_folder) {
|
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();
|
$params = $request->getParsedBody();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user