From 46f185e32e45589cdc4e066b008c775d71b6d172 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 26 Jul 2004 14:47:03 +0000 Subject: [PATCH] Modif de info() --- htdocs/propal.class.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index bdb11a87552..38a270c0751 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -738,7 +738,7 @@ class Propal Function info($id) { $sql = "SELECT c.rowid, ".$this->db->pdate("datec")." as datec"; - + $sql .= ", fk_user_valid, fk_user_cloture, fk_user_author"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= " WHERE c.rowid = $id"; @@ -750,16 +750,26 @@ class Propal $this->id = $obj->rowid; - $cuser = new User($this->db, $obj->fk_user); + $this->date_creation = $obj->datec; + + $cuser = new User($this->db, $obj->fk_user_author); $cuser->fetch(); $this->user_creation = $cuser; - $muser = new User($this->db, $obj->fk_user_modif); - $muser->fetch(); - $this->user_modification = $muser; + if ($obj->fk_user_valid) + { + $vuser = new User($this->db, $obj->fk_user_valid); + $vuser->fetch(); + $this->user_validation = $vuser; + } + + if ($obj->fk_user_cloture) + { + $cluser = new User($this->db, $obj->fk_user_cloture); + $cluser->fetch(); + $this->user_cloture = $cluser; + } - $this->date_creation = $obj->datec; - $this->date_modification = $obj->tms; } $this->db->free();