X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ffunction.select_nat.php;h=57bd46f4a850458157f145186e026dc86acd2502;hb=b867361bcb034fefa0336add9c3f3fb9aa17a4e2;hp=bc0401c8dff173498f6f25ef30d8b507bb36b9ce;hpb=d0327f6de73e81c4bcc656471ca4161e4f1e1e1b;p=platal.git
diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php
index bc0401c..57bd46f 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?$my_text:" ");
}
+
return $html;
}
-function smarty_function_select_nat($params, &$smarty) {
- if(empty($params['pad']) || !($params['pad']))
- $pad = false;
- else
- $pad = true;
+function smarty_function_select_nat($params, $smarty) {
+ if (empty($params['pad']) || !($params['pad'])) {
+ $pad = false;
+ } else {
+ $pad = true;
+ }
+
return select_nat($params['valeur'], $pad);
}