forked from Wavyzz/dolibarr
Fix do not update instance status if method used to update other element
This commit is contained in:
@@ -2754,7 +2754,11 @@ abstract class CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
$this->statut = $status;
|
||||
if (empty($elementId)) // If the element we update was $this (so $elementId is null)
|
||||
{
|
||||
$this->statut = $status;
|
||||
$this->status = $status;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user