Changeset 76 in subversion for trunk/roundcubemail/program/steps/settings/save_identity.inc
- Timestamp:
- Nov 6, 2005 2:26:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/settings/save_identity.inc
r69 r76 23 23 24 24 25 // check input 26 if (empty($_POST['_name']) || empty($_POST['_email'])) 27 { 28 show_message('formincomplete', 'warning'); 29 rcmail_overwrite_action('edit-identitiy'); 30 return; 31 } 32 33 25 34 // update an existing contact 26 35 if ($_POST['_iid']) … … 34 43 continue; 35 44 36 $a_write_sql[] = sprintf(" `%s`='%s'", $col, addslashes(strip_tags($_POST[$fname])));45 $a_write_sql[] = sprintf("%s=%s", $DB->quoteIdentifier($col), $DB->quote(strip_tags($_POST[$fname]))); 37 46 } 38 47 … … 57 66 $DB->query("UPDATE ".get_table_name('identities')." 58 67 SET ".$DB->quoteIdentifier('default')."='0' 59 WHERE identity_id!=?60 AND user_id=?68 WHERE user_id=? 69 AND identity_id<>? 61 70 AND del<>'1'", 62 $_ POST['_iid'],63 $_ SESSION['user_id']);71 $_SESSION['user_id'], 72 $_POST['_iid']); 64 73 65 74 if ($_POST['_framed']) … … 72 81 { 73 82 // show error message 74 83 show_message('errorsaving', 'error'); 84 rcmail_overwrite_action('edit-identitiy'); 75 85 } 76 86 } … … 88 98 89 99 $a_insert_cols[] = $DB->quoteIdentifier($col); 90 $a_insert_values[] = sprintf("'%s'", addslashes(strip_tags($_POST[$fname])));100 $a_insert_values[] = $DB->quote(strip_tags($_POST[$fname])); 91 101 } 92 102 … … 114 124 { 115 125 // show error message 126 show_message('errorsaving', 'error'); 127 rcmail_overwrite_action('edit-identitiy'); 116 128 } 117 129 } … … 119 131 120 132 // go to next step 121 if ($_POST['_framed']) 122 $_action = 'edit-identitiy'; 123 else 124 $_action = 'identities'; 125 126 127 // overwrite action variable 128 $OUTPUT->add_script(sprintf("\n%s.set_env('action', '%s');", $JS_OBJECT_NAME, $_action)); 133 rcmail_overwrite_action($_POST['_framed'] ? 'edit-identitiy' : 'identities'); 129 134 130 135 ?>
Note: See TracChangeset
for help on using the changeset viewer.
