mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
#472 REST Services: added core/delete (to bulk delete, full-featured), and validated the operation core/apply_stimulus
SVN:trunk[2616]
This commit is contained in:
@@ -587,6 +587,10 @@ class RestResult
|
||||
* Result: the requested operation is not valid for the specified version
|
||||
*/
|
||||
const UNKNOWN_OPERATION = 11;
|
||||
/**
|
||||
* Result: the requested operation cannot be performed because it can cause data (integrity) loss
|
||||
*/
|
||||
const UNSAFE = 12;
|
||||
/**
|
||||
* Result: the operation could not be performed, see the message for troubleshooting
|
||||
*/
|
||||
@@ -789,7 +793,11 @@ class RestUtils
|
||||
}
|
||||
elseif (is_numeric($key))
|
||||
{
|
||||
$res = MetaModel::GetObject($sClass, $key);
|
||||
$res = MetaModel::GetObject($sClass, $key, false);
|
||||
if (is_null($res))
|
||||
{
|
||||
throw new Exception("Invalid object $sClass::$key");
|
||||
}
|
||||
}
|
||||
elseif (is_string($key))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user