uniformize code
This commit is contained in:
parent
3890f8e79d
commit
470d0749a5
@ -1150,21 +1150,22 @@ class User extends CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
return $nbrowsaffected;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
|
dol_syslog(get_class($this)."::update error=".$this->error,LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $nbrowsaffected;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
|
||||||
|
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog("User::update ".$this->error,LOG_ERR);
|
dol_syslog(get_class($this)."::update error=".$this->error,LOG_ERR);
|
||||||
return -1;
|
$this->db->rollback();
|
||||||
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user