X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.select_nat.php;h=9e7edd5a75ccecd519b0cddeffcb241980b268d7;hb=8320b6fba6fa245dd71ae9c11b2a2a03f923d15d;hp=cef21189a21f670acad999891a6758080cf4640a;hpb=5ddeb07cc787dd1dc3630a31f1528f5cc7c4d9b9;p=platal.git diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php index cef2118..9e7edd5 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); } +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>