mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
add new rule
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user