Qual: Removed not cleand function

This commit is contained in:
Laurent Destailleur 2015-01-22 19:47:53 +01:00
parent 321e46e596
commit c4782f960c

View File

@ -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);
}
}
}