diff --git a/gamuform_fonctions.php b/gamuform_fonctions.php index 073856d..d9581a5 100644 --- a/gamuform_fonctions.php +++ b/gamuform_fonctions.php @@ -290,7 +290,7 @@ function gamuform_recup_classes(string $objet):array { * * @return array */ -function gamuform_recup_valeurs($objet, $id_objet = 0):array { +function gamuform_recup_valeurs($objet, $id_objet = 0, $where = null):array { $r = []; if (gamuform_objet_autoriser($objet)) { $table = table_objet_sql($objet); @@ -305,7 +305,12 @@ function gamuform_recup_valeurs($objet, $id_objet = 0):array { $r[0] = $valeurs; } } else { - $T = sql_allfetsel('*', $table, 1); + if ($where) { + $w[] = $where; + } else { + $w = 1; + } + $T = sql_allfetsel('*', $table, $w); if (!empty($T)) { foreach ($T as $t) { $t['id'] = $t[$id]; diff --git a/inclure/voir_gamuform.html b/inclure/voir_gamuform.html index cb618eb..4326f08 100644 --- a/inclure/voir_gamuform.html +++ b/inclure/voir_gamuform.html @@ -3,7 +3,6 @@