From d97118f8eff58660294370eb515a1970a5d0c8b6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 13 Aug 2012 10:05:22 +0200 Subject: Fix handling of LDAP values - support arrays (#1488604) --- plugins/new_user_identity/new_user_identity.php | 14 +++++++++----- plugins/new_user_identity/package.xml | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php index f3dae20a3..200d9accd 100644 --- a/plugins/new_user_identity/new_user_identity.php +++ b/plugins/new_user_identity/new_user_identity.php @@ -36,11 +36,14 @@ class new_user_identity extends rcube_plugin $rcmail = rcmail::get_instance(); if ($this->init_ldap($args['host'])) { - $results = $this->ldap->search('*', $args['user'], TRUE); + $results = $this->ldap->search('*', $args['user'], true); if (count($results->records) == 1) { - $args['user_name'] = $results->records[0]['name']; - if (!$args['user_email'] && strpos($results->records[0]['email'], '@')) { - $args['user_email'] = rcube_idn_to_ascii($results->records[0]['email']); + $user_name = is_array($results->records[0]['name']) ? $results->records[0]['name'][0] : $results->records[0]['name']; + $user_email = is_array($results->records[0]['email']) ? $results->records[0]['email'][0] : $results->records[0]['email']; + + $args['user_name'] = $user_name; + if (!$args['user_email'] && strpos($user_email, '@')) { + $args['user_email'] = rcube_idn_to_ascii($user_email); } } } @@ -49,8 +52,9 @@ class new_user_identity extends rcube_plugin private function init_ldap($host) { - if ($this->ldap) + if ($this->ldap) { return $this->ldap->ready; + } $rcmail = rcmail::get_instance(); diff --git a/plugins/new_user_identity/package.xml b/plugins/new_user_identity/package.xml index 7d9d20d39..e50cd9255 100644 --- a/plugins/new_user_identity/package.xml +++ b/plugins/new_user_identity/package.xml @@ -15,9 +15,9 @@ alec@alec.pl yes - 2012-08-07 + 2012-08-13 - 1.0.6 + 1.0.7 1.1 -- cgit v1.2.3 From b8b6e5011a0f87f137870fbf328bcdb8ff3bbbfa Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 13 Aug 2012 21:59:54 +0200 Subject: Skip IDN conversion when saving/reading identies. This should provide proper support for multiple recipeint values including name blocks in bcc and reply-to fields --- program/steps/settings/edit_identity.inc | 4 +--- program/steps/settings/save_identity.inc | 15 +++------------ 2 files changed, 4 insertions(+), 15 deletions(-) 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; -- cgit v1.2.3 From c1037eda18da66a41fc996437986ab6dc499f7c1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Aug 2012 08:31:37 +0200 Subject: Fixed issue with DBMail bug [http://pear.php.net/bugs/bug.php?id=19077] (#1488594) --- plugins/managesieve/Changelog | 2 ++ plugins/managesieve/lib/Net/Sieve.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index c015ee403..482cff0ca 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,5 @@ +- Fixed issue with DBMail bug [http://pear.php.net/bugs/bug.php?id=19077] (#1488594) + * version 5.2 [2012-07-24] ----------------------------------------------------------- - Added GUI for variables setting - RFC5229 (patch from Paweł Słowik) diff --git a/plugins/managesieve/lib/Net/Sieve.php b/plugins/managesieve/lib/Net/Sieve.php index a8e36d8d7..8a0a9b0e1 100644 --- a/plugins/managesieve/lib/Net/Sieve.php +++ b/plugins/managesieve/lib/Net/Sieve.php @@ -1098,7 +1098,9 @@ class Net_Sieve return PEAR::raiseError(trim($response . $line), 6); } - if (preg_match('/^{([0-9]+)}/i', $line, $matches)) { + // "\+?" is added in the regexp to workaround DBMail bug + // http://dbmail.org/mantis/view.php?id=963 + if (preg_match('/^{([0-9]+)\+?}/i', $line, $matches)) { // Matches literal string responses. $line = $this->_recvBytes($matches[1] + 2); -- cgit v1.2.3 From 8faaa7d1d07990c36c92fe251a9296ca988cdeff Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 14 Aug 2012 09:59:46 +0200 Subject: Chrome requires child elements to define border-radius, too --- skins/larry/mail.css | 4 ++++ skins/larry/styles.css | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 6e4e0cd7d..4fff24307 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -137,6 +137,10 @@ a.iconbutton.threadmode.selected { background-position: 6px 2px; } +#mailboxlist li:first-child { + border-radius: 4px 4px 0 0; +} + #mailboxlist li.mailbox a { padding-left: 36px; white-space: nowrap; diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 1bdd30362..0a72c5048 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -824,6 +824,10 @@ table.layout td { overflow: hidden; } +.uibox .boxfooter { + border-radius: 0 0 4px 4px; +} + .boxfooter .listbutton { display: inline-block; text-decoration: none; @@ -834,6 +838,10 @@ table.layout td { margin-top: 1px; } +.uibox .boxfooter .listbutton:first-child { + border-radius: 0 0 0 4px; +} + .boxfooter .listbutton .inner { display: inline-block; width: 48px; -- cgit v1.2.3 From 248d781e5f2caa26b4608d6de572e5a143321a91 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 14 Aug 2012 12:20:02 +0200 Subject: Improve text wrapping in replies --- program/steps/mail/func.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = ''; -- cgit v1.2.3 From e1cfb0bc01395bc71162cdd986234f3fe009edb4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Aug 2012 14:09:39 +0200 Subject: s/rcmail/rcube/ --- program/include/rcube_ldap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index 3a7fc1805..5561613db 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -767,9 +767,9 @@ class rcube_ldap extends rcube_addressbook } // use VLV pseudo-search for autocompletion - $rcmail = rcmail::get_instance(); + $rcube = rcube::get_instance(); - if ($this->prop['vlv_search'] && $this->conn && join(',', (array)$fields) == join(',', $rcmail->config->get('contactlist_fields'))) + if ($this->prop['vlv_search'] && $this->conn && join(',', (array)$fields) == join(',', $rcube->config->get('contactlist_fields'))) { // add general filter to query if (!empty($this->prop['filter']) && empty($this->filter)) -- cgit v1.2.3 From b8dc3e0e61311fe03f21761fd7de1ca80d10c990 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Aug 2012 15:10:05 +0200 Subject: Disable autocapitalization in login form on iPad/iPhone (#1488609) --- CHANGELOG | 1 + program/include/html.php | 2 +- program/include/rcube_output_html.php | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3441f1e03..827bb5c0c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Disable autocapitalization in login form on iPad/iPhone (#1488609) - Fix focus on the list when list row is clicked (#1488600) - Added separate From and To columns apart from smart From/To column (#1486891) - Fix fallback to Larry skin when configured skin isn't available (#1488591) diff --git a/program/include/html.php b/program/include/html.php index b42da1d7f..6d177e16d 100644 --- a/program/include/html.php +++ b/program/include/html.php @@ -358,7 +358,7 @@ class html_inputfield extends html protected $tagname = 'input'; protected $type = 'text'; protected $allowed = array( - 'type','name','value','size','tabindex', + 'type','name','value','size','tabindex','autocapitalize', 'autocomplete','checked','onchange','onclick','disabled','readonly', 'spellcheck','results','maxlength','src','multiple','placeholder', ); diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php index 30512d227..0a8f0e364 100644 --- a/program/include/rcube_output_html.php +++ b/program/include/rcube_output_html.php @@ -1378,6 +1378,9 @@ class rcube_output_html extends rcube_output if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING'])) $url = $_SERVER['QUERY_STRING']; + // Disable autocapitalization on iPad/iPhone (#1488609) + $attrib['autocapitalize'] = 'off'; + // set atocomplete attribute $user_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off'); $host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off'); -- cgit v1.2.3 From b28a38c7575dd6068d9e1b7f95e391e214a52a78 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Aug 2012 15:22:16 +0200 Subject: - Fix Remove from group option is active for contact search result (#1488608) --- CHANGELOG | 1 + program/js/app.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 827bb5c0c..8e585822b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix Remove from group option is active for contact search result (#1488608) - Disable autocapitalization in login form on iPad/iPhone (#1488609) - Fix focus on the list when list row is clicked (#1488600) - Added separate From and To columns apart from smart From/To column (#1486891) diff --git a/program/js/app.js b/program/js/app.js index 214a5cb80..de61b21f1 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -4031,8 +4031,7 @@ function rcube_webmail() // if a group is currently selected, and there is at least one contact selected // thend we can enable the group-remove-selected command - this.enable_command('group-remove-selected', typeof this.env.group != 'undefined' && list.selection.length > 0); - + this.enable_command('group-remove-selected', this.env.group && list.selection.length > 0); this.enable_command('compose', this.env.group || list.selection.length > 0); this.enable_command('edit', id && writable); this.enable_command('delete', list.selection.length && writable); -- cgit v1.2.3 From 56689b31ae3746600b12a9c5c9ec1438e704a6e7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 14 Aug 2012 15:40:14 +0200 Subject: Fix inactive Save search option after advanced search (#1488607) --- CHANGELOG | 1 + program/steps/addressbook/search.inc | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8e585822b..c2d7c40f4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix inactive Save search option after advanced search (#1488607) - Fix Remove from group option is active for contact search result (#1488608) - Disable autocapitalization in login form on iPad/iPhone (#1488609) - Fix focus on the list when list row is clicked (#1488600) 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 -- cgit v1.2.3