]> git.wh0rd.org Git - tt-rss.git/commitdiff
save configuration: localization fix
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 15 Aug 2007 02:49:55 +0000 (03:49 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 15 Aug 2007 02:49:55 +0000 (03:49 +0100)
functions.php
modules/pref-prefs.php

index f3136413ec686232c71c1559cdcd379d6b74a8d5..629b78cb390c31e3e8f232f6fccf019d65d75bb2 100644 (file)
                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)
                         else
                                $sel = "";
 
-                       if ($v == "Yes") {
+                       if ($v == $true_is) {
                                $sel .= " value=\"1\"";
                        } else {
                                $sel .= " value=\"0\"";
index 252db29d11cb99f18b02b7c6669313805402ec90..3584c622f96194c066f2098930bc549c3558ed0f 100644 (file)
@@ -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);
 
                        return prefs_js_redirect();
 
-               } else if ($subop == "Change theme") {
+               } else if ($subop == __("Change theme")) {
 
                        $theme = db_escape_string($_POST["theme"]);
 
                                                $value = __("No");
                                        }
 
-                                       print_radio($pref_name, $value, array(__("Yes"), __("No")));
+                                       print_radio($pref_name, $value, __("Yes"), array(__("Yes"), __("No")));
                        
                                } else {
                                        print "<input class=\"editbox\" name=\"$pref_name\" value=\"$value\">";