From: Andrew Dolgov Date: Thu, 17 Nov 2005 05:34:52 +0000 (+0100) Subject: print_radio() fixes X-Git-Tag: schema_feature_freeze_for_1.1~275 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5da169d99285701831b385650a712a9d41c38da4;p=tt-rss.git print_radio() fixes --- diff --git a/backend.php b/backend.php index f37c51bd..2a488e88 100644 --- a/backend.php +++ b/backend.php @@ -1523,8 +1523,10 @@ $type_name = db_fetch_result($result, 0, "type_name"); +// print "$pref_name : $type_name : $value
"; + 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 { diff --git a/functions.php b/functions.php index 75fc8003..08a00246 100644 --- a/functions.php +++ b/functions.php @@ -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 " $v ";