diff --git a/include/class/document.class.php b/include/class/document.class.php index 6a6881d25..82b0b8055 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -451,7 +451,6 @@ class Document * all the needed data are in $_FILES we don't increment the seq * $_FILES : array containing by default $_FILES * @param int $p_ag_id ACTION_GESTION.AG_ID - * @param int $agc_id ACTION_GESTION_COMMENT.AGC_ID * @returns array of int DOCUMENT.D_ID (id of saved documents ) * */ @@ -498,8 +497,12 @@ class Document // insert into the table $sql="insert into document (ag_id, d_lob,d_filename,d_mimetype,d_number,d_description)" . " values ($1,$2,$3,$4,$5,$6) returning d_id"; - $document_saved[]=$this->db->get_value($sql, + $document_id=$this->db->get_value($sql, array($p_ag_id, $this->d_lob, $this->d_filename, $this->d_mimetype, 1, $this->d_description)); + + + $document_saved[]=$document_id; + } } /* end for */ $this->db->commit(); diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index c4f260a09..8a3b426aa 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -995,7 +995,8 @@ class Follow_Up where agc_id = $4 " , array(strip_tags($this->ag_description), $this->ag_description, $_SESSION[SESSION_KEY.'g_user'], $this->ag_description_id)); - + $this->db->exec_sql("insert into action_comment_document(document_id,action_gestion_comment_id) values ($1,$2)", + [$document_id,$this->ag_description_id]); } $this->insert_operation(); $this->insert_action(); diff --git a/include/template/follow_up-display.php b/include/template/follow_up-display.php index f3851b047..e9156d542 100644 --- a/include/template/follow_up-display.php +++ b/include/template/follow_up-display.php @@ -3,6 +3,7 @@ //This file is part of NOALYSS and is under GPL //see licence.txt $uniq=uniqid("tab",TRUE); +$dossier_id=Dossier::id(); ?>