From bc1469ff29b7deb70c4d9fc503f84e609d207e16 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Apr 2013 11:03:24 +0200 Subject: [PATCH] Fix: More complete function --- htdocs/core/class/commonobject.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b5d49b77dea..e1c4be97184 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1421,12 +1421,14 @@ abstract class CommonObject dol_syslog(get_class($this)."::update_note sql=".$sql, LOG_DEBUG); if ($this->db->query($sql)) { - $this->note = $note; // deprecated + if ($suffix == '_public') $this->note_public = $note; + else if ($suffix == '_private') $this->note_private = $note; + else $this->note = $note; return 1; } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::update_note error=".$this->error, LOG_ERR); return -1; }