diff --git a/include/class/document.class.php b/include/class/document.class.php index 1f9ed7508..64641f8c1 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -554,7 +554,7 @@ class Document $p_tag=str_replace('=','',$p_tag); $r="Tag inconnu"; static $aComment=NULL; - static $counter_comment =0 ; /*db,$p_array["ag_id"]); $aRelatedAction=array(); $aParent=$followup->get_parent(); + if ($aParent == -1 )return ""; $nb_parent=count($aParent); $sql_related_action = " select ag_id, @@ -1434,6 +1435,16 @@ class Document return $status; } return ""; + // type of document + case 'DOCUMENT_TYPE': + $ret=""; + if ( isset($p_array['ag_id'])){ + $ret=$this->db->get_value("select dt_value + from action_gestion + join document_type dt on (ag_type=dt.dt_id) + where ag_id=$1",array($p_array["ag_id"])); + } + return $ret; } // end switch