$id_objet = intval($captures[2]);
// Si on cherche un type et que c'est le bon, on renvoit un tableau que d'identifiants
- if (is_string($type) and $type == $objet and $id_objet){
+ if (is_string($type) AND $type == $objet AND ($id_objet OR $objet=="rubrique")){
$select[] = $id_objet;
}
- elseif(!$type){
+ elseif(!$type AND ($id_objet OR $objet=="rubrique")){
$select[] = array('objet' => $objet, 'id_objet' => $id_objet);
}
}
while (count($fratrie) AND is_array($types) AND count($types)){
$type = array_shift($types);
$h = sql_allfetsel("DISTINCT id_rubrique",table_objet_sql($type),sql_in('id_rubrique',$fratrie));
- $has = array_merge($has,array_map('reset',$h));
+ $h = array_map('reset',$h);
+ $has = array_merge($has,$h);
$fratrie = array_diff($fratrie,$h);
}
if (count($has))
return $has_child[$id_rubrique]?' ':'';
}
-?>
\ No newline at end of file
+?>