projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix listes.p.o/
[platal.git]
/
plugins
/
function.select_db_table.php
diff --git
a/plugins/function.select_db_table.php
b/plugins/function.select_db_table.php
index
7c598e8
..
eef9e1d
100644
(file)
--- a/
plugins/function.select_db_table.php
+++ b/
plugins/function.select_db_table.php
@@
-28,8
+28,8
@@
function select_options($table,$valeur,$champ="text",$pad=false,
$order = $champ;
if ($group) {
$fields .= ',' . $group;
$order = $champ;
if ($group) {
$fields .= ',' . $group;
- $order = $group . ',' . $order;
- }
+ $order = $group . ',' . $order;
+ }
$sql = "SELECT $fields FROM $table AS t $join $where ORDER BY $order";
$res = XDB::iterRow($sql);
$sel = ' selected="selected"';
$sql = "SELECT $fields FROM $table AS t $join $where ORDER BY $order";
$res = XDB::iterRow($sql);
$sel = ' selected="selected"';
@@
-48,8
+48,8
@@
function select_options($table,$valeur,$champ="text",$pad=false,
$html .= '<optgroup label="' . pl_entities($my_grp, ENT_QUOTES) . '">';
$optgrp = $my_grp;
}
$html .= '<optgroup label="' . pl_entities($my_grp, ENT_QUOTES) . '">';
$optgrp = $my_grp;
}
- $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
- $my_id,
($valeur==$my_id?$sel:""), $my_text
);
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
+ $my_id,
$valeur==$my_id ? $sel : "", pl_entities($my_text)
);
}
if (!is_null($optgrp)) {
$html .= '</optgroup>';
}
if (!is_null($optgrp)) {
$html .= '</optgroup>';