From 87e3ed6ed09a9fcd3cab45a6ce674396e51b95bb Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 10 Aug 2006 14:53:07 -0400
Subject: [PATCH] Updated Slovak translation

---
 program/steps/settings/save_prefs.inc |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 16d7f23..98912da 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -24,7 +24,8 @@
   $a_user_prefs = array();
 
 
-$a_user_prefs['timezone'] = isset($_POST['_timezone']) ? (int)$_POST['_timezone'] : $CONFIG['timezone'];
+$a_user_prefs['timezone'] = isset($_POST['_timezone']) ? floatval($_POST['_timezone']) : $CONFIG['timezone'];
+$a_user_prefs['dst_active'] = isset($_POST['_dst_active']) ? TRUE : FALSE;
 $a_user_prefs['pagesize'] = is_numeric($_POST['_pagesize']) ? (int)$_POST['_pagesize'] : $CONFIG['pagesize'];
 $a_user_prefs['prefer_html'] = isset($_POST['_prefer_html']) ? TRUE : FALSE;
 
@@ -37,22 +38,8 @@
   rcmail_set_locale($sess_user_lang);
   }
 
-
-$DB->query("UPDATE ".get_table_name('users')."
-            SET    preferences=?,
-                   language=?
-            WHERE  user_id=?",
-            serialize($a_user_prefs),
-            $sess_user_lang,
-            $_SESSION['user_id']);
-
-if ($DB->affected_rows())
-  {
+if (rcmail_save_user_prefs($a_user_prefs))
   show_message('successfullysaved', 'confirmation');
-  
-  $_SESSION['user_prefs'] = $a_user_prefs;  
-  $CONFIG = array_merge($CONFIG, $a_user_prefs);
-  }
 
 
 // go to next step

--
Gitblit v1.9.1