X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.select_nat.php;h=38bdb2e7404072cd7375547d0afb17edb5ab571a;hb=faea3db3053e54bbf91cedba3f048396aa725af1;hp=ebfa2f3b2c7c0ce0250046da8fdf3b5a927fc090;hpb=1f58ccb1e75eca08fbd04971d617ea372bc77b5a;p=platal.git
diff --git a/plugins/function.select_nat.php b/plugins/function.select_nat.php
index ebfa2f3..38bdb2e 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);
}