Changeset 4166 in subversion
- Timestamp:
- Nov 2, 2010 5:27:03 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 12 edited
-
CHANGELOG (modified) (1 diff)
-
SQL/mssql.initial.sql (modified) (1 diff)
-
SQL/mssql.upgrade.sql (modified) (2 diffs)
-
SQL/mysql.initial.sql (modified) (1 diff)
-
SQL/mysql.update.sql (modified) (1 diff)
-
SQL/postgres.initial.sql (modified) (1 diff)
-
SQL/postgres.update.sql (modified) (1 diff)
-
SQL/sqlite.initial.sql (modified) (1 diff)
-
SQL/sqlite.update.sql (modified) (1 diff)
-
program/js/common.js (modified) (1 diff)
-
program/steps/addressbook/save.inc (modified) (6 diffs)
-
program/steps/mail/addcontact.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4162 r4166 59 59 - Improve performance of setting IMAP flags using .SILENT suffix 60 60 - Improve performance of message cache status checking with skip_disabled=true 61 - Support contact's email addresses up to 255 characters long (#1487095) 61 62 62 63 RELEASE 0.4.2 -
trunk/roundcubemail/SQL/mssql.initial.sql
r4053 r4166 14 14 [del] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL , 15 15 [name] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , 16 [email] [varchar] ( 128) COLLATE Latin1_General_CI_AI NOT NULL ,16 [email] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL , 17 17 [firstname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , 18 18 [surname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , -
trunk/roundcubemail/SQL/mssql.upgrade.sql
r4053 r4166 23 23 GO 24 24 25 ALTER TABLE [dbo].[identities] add[changed] [datetime] NULL25 ALTER TABLE [dbo].[identities] ADD [changed] [datetime] NULL 26 26 GO 27 27 … … 94 94 CREATE UNIQUE INDEX [IX_users_username] ON [dbo].[users]([username],[mail_host]) ON [PRIMARY] 95 95 GO 96 ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL 97 GO 96 98 -
trunk/roundcubemail/SQL/mysql.initial.sql
r4053 r4166 84 84 `del` tinyint(1) NOT NULL DEFAULT '0', 85 85 `name` varchar(128) NOT NULL DEFAULT '', 86 `email` varchar( 128) NOT NULL,86 `email` varchar(255) NOT NULL, 87 87 `firstname` varchar(128) NOT NULL DEFAULT '', 88 88 `surname` varchar(128) NOT NULL DEFAULT '', -
trunk/roundcubemail/SQL/mysql.update.sql
r4053 r4166 130 130 ALTER TABLE `users` ADD UNIQUE `username` (`username`, `mail_host`); 131 131 132 ALTER TABLE `contacts` MODIFY `email` varchar(255) NOT NULL; 133 -
trunk/roundcubemail/SQL/postgres.initial.sql
r4053 r4166 108 108 del smallint DEFAULT 0 NOT NULL, 109 109 name varchar(128) DEFAULT '' NOT NULL, 110 email varchar( 128) DEFAULT '' NOT NULL,110 email varchar(255) DEFAULT '' NOT NULL, 111 111 firstname varchar(128) DEFAULT '' NOT NULL, 112 112 surname varchar(128) DEFAULT '' NOT NULL, -
trunk/roundcubemail/SQL/postgres.update.sql
r4053 r4166 87 87 DROP INDEX users_username_id_idx; 88 88 ALTER TABLE users ADD UNIQUE (username, mail_host); 89 ALTER TABLE contacts ALTER email TYPE varchar(255); 89 90 -
trunk/roundcubemail/SQL/sqlite.initial.sql
r4053 r4166 29 29 del tinyint NOT NULL default '0', 30 30 name varchar(128) NOT NULL default '', 31 email varchar( 128) NOT NULL default '',31 email varchar(255) NOT NULL default '', 32 32 firstname varchar(128) NOT NULL default '', 33 33 surname varchar(128) NOT NULL default '', -
trunk/roundcubemail/SQL/sqlite.update.sql
r4053 r4166 147 147 CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host); 148 148 149 CREATE TABLE contacts_tmp ( 150 contact_id integer NOT NULL PRIMARY KEY, 151 user_id integer NOT NULL default '0', 152 changed datetime NOT NULL default '0000-00-00 00:00:00', 153 del tinyint NOT NULL default '0', 154 name varchar(128) NOT NULL default '', 155 email varchar(255) NOT NULL default '', 156 firstname varchar(128) NOT NULL default '', 157 surname varchar(128) NOT NULL default '', 158 vcard text NOT NULL default '' 159 ); 160 161 INSERT INTO contacts_tmp (contact_id, user_id, changed, del, name, email, firstname, surname, vcard) 162 SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts; 163 164 DROP TABLE contacts; 165 CREATE TABLE contacts ( 166 contact_id integer NOT NULL PRIMARY KEY, 167 user_id integer NOT NULL default '0', 168 changed datetime NOT NULL default '0000-00-00 00:00:00', 169 del tinyint NOT NULL default '0', 170 name varchar(128) NOT NULL default '', 171 email varchar(255) NOT NULL default '', 172 firstname varchar(128) NOT NULL default '', 173 surname varchar(128) NOT NULL default '', 174 vcard text NOT NULL default '' 175 ); 176 177 INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, surname, vcard) 178 SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts_tmp; 179 180 CREATE INDEX ix_contacts_user_id ON contacts(user_id, email); 181 DROP TABLE contacts_tmp; 182 -
trunk/roundcubemail/program/js/common.js
r4009 r4166 492 492 // Use simplified domain matching, because we need to allow Unicode characters here 493 493 // So, e-mail address should be validated also on server side after idn_to_ascii() use 494 sub_domain = '[^@]+',495 494 //domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d', 496 495 //sub_domain = '('+atom+'|'+domain_literal+')', 496 domain = '([^@\\x2e]+\\x2e)+[a-z]{2,}', 497 497 word = '('+atom+'|'+quoted_string+')', 498 498 delim = '[,;\s\n]', 499 domain = sub_domain+'(\\x2e'+sub_domain+')*',500 499 local_part = word+'(\\x2e'+word+')*', 501 500 addr_spec = local_part+'\\x40'+domain, -
trunk/roundcubemail/program/steps/addressbook/save.inc
r4025 r4166 21 21 22 22 $cid = get_input_value('_cid', RCUBE_INPUT_POST); 23 $return_action = empty($cid) ? 'add' : ' show';23 $return_action = empty($cid) ? 'add' : 'edit'; 24 24 25 25 // cannot edit record 26 if ($CONTACTS->readonly) 27 { 26 if ($CONTACTS->readonly) { 28 27 $OUTPUT->show_message('contactreadonly', 'error'); 29 28 rcmail_overwrite_action($return_action); … … 31 30 } 32 31 33 // check input 34 if ((!get_input_value('_name', RCUBE_INPUT_POST) || !get_input_value('_email', RCUBE_INPUT_POST))) 35 { 32 // Basic input checks 33 if ((!get_input_value('_name', RCUBE_INPUT_POST) || !get_input_value('_email', RCUBE_INPUT_POST))) { 36 34 $OUTPUT->show_message('formincomplete', 'warning'); 37 35 rcmail_overwrite_action($return_action); … … 45 43 46 44 // read POST values into hash array 47 foreach ($a_save_cols as $col) 48 { 45 foreach ($a_save_cols as $col) { 49 46 $fname = '_'.$col; 50 47 if (isset($_POST[$fname])) 51 48 $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST); 49 } 50 51 // Validity checks 52 $_email = idn_to_ascii($a_record['email']); 53 if (!check_email($_email, false)) { 54 $OUTPUT->show_message('emailformaterror', 'warning', array('email' => $_email)); 55 rcmail_overwrite_action($return_action); 56 return; 52 57 } 53 58 … … 58 63 array('id' => $cid, 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 59 64 $a_record = $plugin['record']; 60 65 61 66 if (!$plugin['abort']) 62 67 $result = $CONTACTS->update($cid, $a_record); … … 71 76 $_POST['_cid'] = $newcid; 72 77 } 73 78 74 79 // define list of cols to be displayed 75 80 $a_js_cols = array(); … … 81 86 // update the changed col in list 82 87 $OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid); 83 88 84 89 // show confirmation 85 90 $OUTPUT->show_message('successfullysaved', 'confirmation', null, false); -
trunk/roundcubemail/program/steps/mail/addcontact.inc
r4025 r4166 30 30 { 31 31 $contact_arr = $IMAP->decode_address_list(get_input_value('_address', RCUBE_INPUT_POST, true), 1, false); 32 32 33 33 if (!empty($contact_arr[1]['mailto'])) { 34 34 $contact = array( … … 36 36 'name' => $contact_arr[1]['name'] 37 37 ); 38 39 // Validity checks 40 if (empty($contact['email'])) { 41 $OUTPUT->show_message('errorsavingcontact', 'error'); 42 $OUTPUT->send(); 43 } 44 else if (!check_email($contact['email'], false)) { 45 $OUTPUT->show_message('emailformaterror', 'error', array('email' => $contact['email'])); 46 $OUTPUT->send(); 47 } 38 48 39 49 $contact['email'] = idn_to_utf8($contact['email']); … … 61 71 62 72 if (!$done) 63 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsavingcontact', ' warning');73 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsavingcontact', 'error'); 64 74 65 75 $OUTPUT->send();
Note: See TracChangeset
for help on using the changeset viewer.
