From 09541f3a0e96706587dd57952a6ec46815feb5fd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 May 2007 12:03:31 +0000 Subject: [PATCH] Ajout logs --- htdocs/usergroup.class.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/usergroup.class.php b/htdocs/usergroup.class.php index 4319f4adec2..da22e5ef846 100644 --- a/htdocs/usergroup.class.php +++ b/htdocs/usergroup.class.php @@ -60,10 +60,11 @@ class UserGroup } - /** - * \brief Charge un objet user avec toutes ces caractéristiques - * \param id id du groupe à charger - */ + /** + * \brief Charge un objet user avec toutes ces caractéristiques + * \param id id du groupe à charger + * \return int <0 si KO, >0 si OK + */ function fetch($id) { $this->id = $id; @@ -72,8 +73,8 @@ class UserGroup $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " WHERE g.rowid = ".$this->id; - $result = $this->db->query($sql); - + dolibarr_syslog("Usergroup::fetch sql=".$sql); + $result = $this->db->query($sql); if ($result) { if ($this->db->num_rows($result)) @@ -87,11 +88,12 @@ class UserGroup $this->datem = $obj->datem; } $this->db->free($result); - + return 1; } else { dolibarr_syslog("UserGroup::Fetch Erreur"); + return -1; } }