diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 4d455f79369..9619ae462f4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2497,45 +2497,4 @@ class ContratLigne extends CommonObject } } - /** - * Load elements linked to contract (only intervention for the moment) - * - * @param string $type Object type - * @return array $elements array of linked elements - */ - function get_element_list($type) - { - $elements = array(); - - $sql = ''; - if ($type == 'intervention') - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "fichinter WHERE fk_contrat=" . $this->id; - if (! $sql) return -1; - - //print $sql; - dol_syslog(get_class($this)."::get_element_list", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - $nump = $this->db->num_rows($result); - if ($nump) - { - $i = 0; - while ($i < $nump) - { - $obj = $this->db->fetch_object($result); - $elements[$i] = $obj->rowid; - $i++; - } - $this->db->free($result); - /* Return array */ - return $elements; - } - } - else - { - dol_print_error($this->db); - } - } - }