X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.select_nat.php;h=3c9b4d02f97b4393d4464d6e06c529d946dbcf24;hb=43b816c7ed20f3b1dbb5c8b6971d8582016a7a86;hp=e17b738fae2fe9e60292a2f97b1a143ae20b11ba;hpb=805f3d1679a53bb04fff34619c171a1381068612;p=platal.git diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php index e17b738..3c9b4d0 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); }