From f541eb78f748e128620fa85c7c1c47c3cae2ee4e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 15 Aug 2007 03:49:55 +0100 Subject: [PATCH] save configuration: localization fix --- functions.php | 4 ++-- modules/pref-prefs.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index f3136413..629b78cb 100644 --- a/functions.php +++ b/functions.php @@ -1155,7 +1155,7 @@ return ((float)$usec + (float)$sec); } - function print_radio($id, $default, $values, $attributes = "") { + function print_radio($id, $default, $true_is, $values, $attributes = "") { foreach ($values as $v) { if ($v == $default) @@ -1163,7 +1163,7 @@ else $sel = ""; - if ($v == "Yes") { + if ($v == $true_is) { $sel .= " value=\"1\""; } else { $sel .= " value=\"0\""; diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 252db29d..3584c622 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -62,6 +62,8 @@ $_SESSION["prefs_cache"] = false; +// print_r($_POST); + foreach (array_keys($_POST) as $pref_name) { $pref_name = db_escape_string($pref_name); @@ -134,7 +136,7 @@ return prefs_js_redirect(); - } else if ($subop == "Change theme") { + } else if ($subop == __("Change theme")) { $theme = db_escape_string($_POST["theme"]); @@ -360,7 +362,7 @@ $value = __("No"); } - print_radio($pref_name, $value, array(__("Yes"), __("No"))); + print_radio($pref_name, $value, __("Yes"), array(__("Yes"), __("No"))); } else { print ""; -- 2.39.5