X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.select_nat.php;h=0d39a7b44874b1382dd957265b82dbf2adf2ea94;hb=9891bd15f772caef0c199a98f036e976bf4ab94a;hp=6628003a5bdceced9f476322508448a3d81b6556;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php index 6628003..0d39a7b 100644 --- a/plugins/function.select_nat.php +++ b/plugins/function.select_nat.php @@ -1,6 +1,6 @@ \n"; + $html .= sprintf("\n", ($valeur ? $sel : "")); } - while (list($my_id,$my_text) = $res->next()) { - $html .= sprintf("\n",$my_id,($valeur==$my_id?$sel:""),$my_text); + while (list($my_id, $my_text) = $res->next()) { + $html .= sprintf("\n", $my_id, ($valeur==$my_id ? $sel : ""), $my_text); } + return $html; } function smarty_function_select_nat($params, &$smarty) { - if(empty($params['pad']) || !($params['pad'])) - $pad = false; - else - $pad = true; + if (empty($params['pad']) || !($params['pad'])) { + $pad = false; + } else { + $pad = true; + } + return select_nat($params['valeur'], $pad); }