From 38bf9d3b71067a51ffc9a915ea288929d1fb08e4 Mon Sep 17 00:00:00 2001
From: yllar <yllar.pajus@gmail.com>
Date: Thu, 14 Dec 2006 15:44:42 -0500
Subject: [PATCH] updated Spanish translation

---
 program/steps/settings/save_identity.inc |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc
index ffbcfe3..60a6855 100644
--- a/program/steps/settings/save_identity.inc
+++ b/program/steps/settings/save_identity.inc
@@ -19,9 +19,9 @@
 
 */
 
-$a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature');
+$a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature', 'html_signature');
 $a_html_cols = array('signature');
-
+$a_boolean_cols = array('standard', 'html_signature');
 
 // check input
 if (empty($_POST['_name']) || empty($_POST['_email']))
@@ -48,6 +48,17 @@
                              $DB->quote(get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols))));
     }
 
+  // set "off" values for checkboxes that were not checked, and therefore
+  // not included in the POST body.
+  foreach ($a_boolean_cols as $col)
+    {
+    $fname = '_' . $col;
+    if (!isset($_POST[$fname]))
+      {
+      $a_write_sql[] = sprintf("%s=0", $DB->quoteIdentifier($col));
+      }
+    }
+
   if (sizeof($a_write_sql))
     {
     $DB->query("UPDATE ".get_table_name('identities')."

--
Gitblit v1.9.1