print_radio() fixes
This commit is contained in:
parent
bc0e653d21
commit
5da169d992
2 changed files with 13 additions and 3 deletions
|
@ -1523,8 +1523,10 @@
|
|||
|
||||
$type_name = db_fetch_result($result, 0, "type_name");
|
||||
|
||||
// print "$pref_name : $type_name : $value<br>";
|
||||
|
||||
if ($type_name == "bool") {
|
||||
if ($value == 1) {
|
||||
if ($value == "1") {
|
||||
$value = "true";
|
||||
} else {
|
||||
$value = "false";
|
||||
|
@ -1546,6 +1548,8 @@
|
|||
|
||||
} else if ($subop == "Reset to defaults") {
|
||||
|
||||
db_query($link, "UPDATE ttrss_prefs SET value = def_value");
|
||||
|
||||
header("Location: prefs.php");
|
||||
|
||||
} else {
|
||||
|
|
|
@ -458,9 +458,15 @@
|
|||
foreach ($values as $v) {
|
||||
|
||||
if ($v == $default)
|
||||
$sel = "checked value=\"1\"";
|
||||
$sel = "checked";
|
||||
else
|
||||
$sel = "value=\"0\"";
|
||||
$sel = "";
|
||||
|
||||
if ($v == "Yes") {
|
||||
$sel .= " value=\"1\"";
|
||||
} else {
|
||||
$sel .= " value=\"0\"";
|
||||
}
|
||||
|
||||
print "<input type=\"radio\" $sel $attributes name=\"$id\"> $v ";
|
||||
|
||||
|
|
Loading…
Reference in a new issue