From 570179fdf1ddcee2b14703463eac6aa6ee57c24c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 15 May 2003 19:30:01 +0000 Subject: [PATCH] Ajout d'infos manquantes dans le fetch --- htdocs/actioncomm.class.php3 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/actioncomm.class.php3 b/htdocs/actioncomm.class.php3 index 9d7e539872b..bb43fbbd756 100644 --- a/htdocs/actioncomm.class.php3 +++ b/htdocs/actioncomm.class.php3 @@ -20,7 +20,8 @@ * */ -class ActionComm { +class ActionComm +{ var $id; var $db; @@ -39,9 +40,12 @@ class ActionComm { var $percent; - Function ActionComm($db) { + Function ActionComm($db) + { $this->db = $db; $this->societe = new Societe($db); + $this->author = new User($db); + $this->contact = new Contact($db); } /* @@ -67,7 +71,7 @@ class ActionComm { */ Function fetch($id) { - $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc "; + $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact "; $sql .= "FROM actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;"; if ($this->db->query($sql) ) { @@ -81,6 +85,10 @@ class ActionComm { $this->societe->id = $obj->fk_soc; + $this->author->id = $obj->fk_user_author; + + $this->contact->id = $obj->fk_contact; + $this->db->free(); } } else {