X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ffunction.select_nat.php;h=9a73f39268465f6cdc578156c364004ef3500dbc;hb=d4d395bbdf6fdb819eaf5af9b8b64cbc82d7e2e8;hp=813cb09f999320c76c14c2a477cc4b4954acbea6;hpb=a3a049fc80d3707bcc76903ab89f73974c470c0c;p=platal.git diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php index 813cb09..9a73f39 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: ?>