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_identity.inc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc
index dc61b78..9df6c61 100644
--- a/program/steps/settings/save_identity.inc
+++ b/program/steps/settings/save_identity.inc
@@ -20,6 +20,7 @@
 */
 
 $a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature');
+$a_html_cols = array('signature');
 
 
 // check input
@@ -42,7 +43,9 @@
     if (!isset($_POST[$fname]))
       continue;
 
-    $a_write_sql[] = sprintf("%s=%s", $DB->quoteIdentifier($col), $DB->quote(strip_tags($_POST[$fname])));
+    $a_write_sql[] = sprintf("%s=%s",
+                             $DB->quoteIdentifier($col),
+                             $DB->quote(get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols))));
     }
 
   if (sizeof($a_write_sql))
@@ -58,7 +61,7 @@
     $updated = $DB->affected_rows();
     }
        
-  if ($updated)
+  if ($updated && !empty($_POST['_standard']))
     {
     show_message('successfullysaved', 'confirmation');
 
@@ -77,7 +80,7 @@
       // ...      
       }
     }
-  else
+  else if ($DB->is_error())
     {
     // show error message
     show_message('errorsaving', 'error');
@@ -97,7 +100,7 @@
       continue;
     
     $a_insert_cols[] = $DB->quoteIdentifier($col);
-    $a_insert_values[] = $DB->quote(strip_tags($_POST[$fname]));
+    $a_insert_values[] = $DB->quote(get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols)));
     }
     
   if (sizeof($a_insert_cols))

--
Gitblit v1.9.1