summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-14 18:55:38 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-14 18:55:38 +0200
commit519e380f637cbc8d2b5c3d7a0d34508ac17d57d8 (patch)
tree0faa5eead671c4e47139e165dba82b27d762fae2 /program/steps
parent413df054ad3235c59c24e897b616c569adc4f67b (diff)
parent56689b31ae3746600b12a9c5c9ec1438e704a6e7 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/addressbook/search.inc7
-rw-r--r--program/steps/mail/func.inc2
-rw-r--r--program/steps/settings/edit_identity.inc4
-rw-r--r--program/steps/settings/save_identity.inc15
4 files changed, 10 insertions, 18 deletions
diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc
index d31e54b1a..851325070 100644
--- a/program/steps/addressbook/search.inc
+++ b/program/steps/addressbook/search.inc
@@ -237,9 +237,12 @@ function rcmail_contact_search()
$OUTPUT->command('set_env', 'source', '');
$OUTPUT->command('set_env', 'group', '');
- // unselect currently selected directory/group
- if (!$sid)
+ if (!$sid) {
+ // unselect currently selected directory/group
$OUTPUT->command('unselect_directory');
+ // enable "Save search" command
+ $OUTPUT->command('enable_command', 'search-create', true);
+ }
$OUTPUT->command('update_group_commands');
// send response
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index b2f81d73c..3d65eacb1 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1488,7 +1488,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
function rcmail_wrap_and_quote($text, $length = 72)
{
// Rebuild the message body with a maximum of $max chars, while keeping quoted message.
- $max = min(77, $length + 8);
+ $max = max(75, $length + 8);
$lines = preg_split('/\r?\n/', trim($text));
$out = '';
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index ebc2c1b20..aa1aeea5d 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -97,9 +97,7 @@ function rcube_identity_form($attrib)
$form['addressing']['content']['email']['class'] = 'disabled';
}
- $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']);
- $IDENTITY_RECORD['reply-to'] = rcube_idn_to_utf8($IDENTITY_RECORD['reply-to']);
- $IDENTITY_RECORD['bcc'] = rcube_idn_to_utf8($IDENTITY_RECORD['bcc']);
+ $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']);
// Allow plugins to modify identity form content
$plugin = $RCMAIL->plugins->exec_hook('identity_form', array(
diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc
index dba143dd8..8515c44f1 100644
--- a/program/steps/settings/save_identity.inc
+++ b/program/steps/settings/save_identity.inc
@@ -58,8 +58,8 @@ if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3)
// Validate e-mail addresses
$email_checks = array(rcube_idn_to_ascii($save_data['email']));
foreach (array('reply-to', 'bcc') as $item) {
- foreach (rcube_mime::decode_address_list(rcube_idn_to_ascii($save_data[$item]), null, false) as $rcpt)
- $email_checks[] = $rcpt['mailto'];
+ foreach (rcube_mime::decode_address_list($save_data[$item], null, false) as $rcpt)
+ $email_checks[] = rcube_idn_to_ascii($rcpt['mailto']);
}
foreach ($email_checks as $email) {
@@ -80,11 +80,6 @@ if ($_POST['_iid'])
if ($save_data['email'])
$save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if ($save_data['bcc'])
- $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']);
- if ($save_data['reply-to'])
- $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']);
-
if (!$plugin['abort'])
$updated = $RCMAIL->user->update_identity($iid, $save_data);
else
@@ -119,11 +114,7 @@ else if (IDENTITIES_LEVEL < 2)
$save_data = $plugin['record'];
if ($save_data['email'])
- $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if ($save_data['bcc'])
- $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']);
- if ($save_data['reply-to'])
- $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']);
+ $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
if (!$plugin['abort'])
$insert_id = $save_data['email'] ? $RCMAIL->user->insert_identity($save_data) : null;