add new rule

This commit is contained in:
Frédéric FRANCE
2020-05-21 00:02:33 +02:00
parent 954d928467
commit 43dcd9beb5
63 changed files with 315 additions and 534 deletions

View File

@@ -159,6 +159,7 @@ class MyModuleApi extends DolibarrApi
}
$result = $db->query($sql);
$i = 0;
if ($result)
{
$num = $db->num_rows($result);
@@ -239,12 +240,11 @@ class MyModuleApi extends DolibarrApi
$this->myobject->$field = $value;
}
if ($this->myobject->update($id, DolibarrApiAccess::$user) > 0)
if ($this->myobject->update(DolibarrApiAccess::$user, false) > 0)
{
return $this->get($id);
}
else
{
else {
throw new RestException(500, $this->myobject->error);
}
}