From 98cb0f179206843ceaa87df6bfb3d1da045ed8ad Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 29 Jan 2011 14:55:12 +0000 Subject: Apply bug fixes and localization updated from trunk for release 0.5.1 --- CHANGELOG | 21 ++ INSTALL | 2 +- SQL/mysql.update.sql | 2 + SQL/postgres.update.sql | 1 + SQL/sqlite.update.sql | 2 + index.php | 15 +- installer/check.php | 2 +- program/include/iniset.php | 2 +- program/include/main.inc | 9 +- program/include/rcmail.php | 4 +- program/include/rcube_html_page.php | 86 +++---- program/include/rcube_imap.php | 95 +++++++- program/include/rcube_plugin_api.php | 3 +- program/include/rcube_template.php | 4 +- program/js/app.js | 33 ++- .../js/tiny_mce/themes/advanced/langs/sv_dlg.js | 4 +- program/lib/Net/IDNA2.php | 252 +++++++++++++++------ program/lib/Net/Socket.php | 209 +++++++++++------ program/localization/az_AZ/labels.inc | 53 ++++- program/localization/az_AZ/messages.inc | 27 +++ program/localization/bg_BG/labels.inc | 44 +++- program/localization/bg_BG/messages.inc | 13 ++ program/localization/da_DK/labels.inc | 54 ++++- program/localization/da_DK/messages.inc | 28 +++ program/localization/de_DE/labels.inc | 34 ++- program/localization/de_DE/messages.inc | 5 +- program/localization/fr_FR/labels.inc | 5 +- program/localization/fr_FR/messages.inc | 12 + program/localization/he_IL/labels.inc | 31 ++- program/localization/he_IL/messages.inc | 1 + program/localization/hu_HU/labels.inc | 2 +- program/localization/it_IT/labels.inc | 36 ++- program/localization/it_IT/messages.inc | 5 +- program/localization/ja_JP/labels.inc | 40 +++- program/localization/ja_JP/messages.inc | 3 +- program/localization/pt_PT/labels.inc | 29 +++ program/localization/pt_PT/messages.inc | 1 + program/localization/ru_RU/labels.inc | 31 ++- program/localization/ru_RU/messages.inc | 1 + program/localization/sk_SK/labels.inc | 22 +- program/localization/sk_SK/messages.inc | 27 +++ program/localization/sv_SE/labels.inc | 34 ++- program/localization/sv_SE/messages.inc | 1 + program/localization/zh_TW/labels.inc | 41 +++- program/localization/zh_TW/messages.inc | 13 ++ program/steps/addressbook/save.inc | 12 + program/steps/mail/func.inc | 36 ++- program/steps/settings/folders.inc | 17 +- program/steps/settings/func.inc | 1 - program/steps/settings/save_prefs.inc | 2 + skins/default/common.css | 2 +- skins/default/ie6hacks.css | 2 +- skins/default/iehacks.css | 5 + skins/default/mail.css | 75 +++--- skins/default/templates/addressbook.html | 1 + skins/default/templates/message.html | 1 + skins/default/templates/messagepreview.html | 1 + 57 files changed, 1183 insertions(+), 311 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3a24db1b7..c9ccc277b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,27 @@ CHANGELOG Roundcube Webmail =========================== +RELEASE 0.5.1 +------------- +- Fix settings UI on IE 6 (#1487724) +- Remove double borders in folder listing (#1487713) +- Separate full message headers UI element from headers table (#1487715) +- Add part MIME ID to message_part_* hooks (#1487718) +- Updated PEAR::Net_Socket to 1.0.10 +- Updated PEAR::Net_IDNA2 to 0.1.1 +- Fix handling of comments inside an email address spec. (#1487673) +- Show full mail subject as title when hovering a cut subject link (#1487128) +- Fix randomly disappearing folders list in IE (#1487704) +- Fix list column add/removal in IE (#1487703) +- Fix login redirect issues (#1487686) +- Require PHP 5.2.1 or greater +- Fix %h/%z variables in username_domain option (#1487701) +- Workaround for setting charset in case of malformed bodystructure response (#1487700) +- Fix impossible to subscribe to protected folders (#1487656) +- Fix setting timezone in Preferences (#1487705) + +RELEASE 0.5 +----------- - Fix double-login/session issue (#1487104) - Wrap HTML parts with and add Doctype declaration (#1487098) - Make rcube_autoload silently skip unknown classes (#1487109) diff --git a/INSTALL b/INSTALL index eb8399786..49aae922a 100644 --- a/INSTALL +++ b/INSTALL @@ -11,7 +11,7 @@ REQUIREMENTS * The Apache or Lighttpd Webserver * .htaccess support allowing overrides for DirectoryIndex -* PHP Version 5.2 or greater including +* PHP Version 5.2.1 or greater including - PCRE, DOM, JSON, XML, Session, Sockets (required) - libiconv (recommended) - mbstring, fileinfo, mcrypt (optional) diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql index 2af0a47e6..aaab43fb2 100644 --- a/SQL/mysql.update.sql +++ b/SQL/mysql.update.sql @@ -131,3 +131,5 @@ ALTER TABLE `users` ADD UNIQUE `username` (`username`, `mail_host`); ALTER TABLE `contacts` MODIFY `email` varchar(255) NOT NULL; +TRUNCATE TABLE `messages`; + diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql index 444caf6f6..2f4498d36 100644 --- a/SQL/postgres.update.sql +++ b/SQL/postgres.update.sql @@ -88,3 +88,4 @@ DROP INDEX users_username_id_idx; ALTER TABLE users ADD UNIQUE (username, mail_host); ALTER TABLE contacts ALTER email TYPE varchar(255); +TRUNCATE messages; diff --git a/SQL/sqlite.update.sql b/SQL/sqlite.update.sql index 328693944..6f2acf913 100644 --- a/SQL/sqlite.update.sql +++ b/SQL/sqlite.update.sql @@ -180,3 +180,5 @@ INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, CREATE INDEX ix_contacts_user_id ON contacts(user_id, email); DROP TABLE contacts_tmp; +DELETE FROM messages; + diff --git a/index.php b/index.php index d44e13bb2..89066b58d 100644 --- a/index.php +++ b/index.php @@ -2,9 +2,9 @@ /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | - | Version 0.5 | + | Version 0.5.1 | | | - | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland | + | Copyright (C) 2005-2011, Roundcube Dev. - Switzerland | | | | This program is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License version 2 | @@ -104,12 +104,17 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { rcmail_log_login(); // restore original request parameters - $query = array('_task' => 'mail'); - if ($url = get_input_value('_url', RCUBE_INPUT_POST)) + $query = array(); + if ($url = get_input_value('_url', RCUBE_INPUT_POST)) { parse_str($url, $query); + + // prevent endless looping on login page + if ($query['_task'] == 'login') + unset($query['_task']); + } // allow plugins to control the redirect url after login success - $redir = $RCMAIL->plugins->exec_hook('login_after', $query); + $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail')); unset($redir['abort']); // send redirect diff --git a/installer/check.php b/installer/check.php index 7fa4d95d3..0ba5f58de 100644 --- a/installer/check.php +++ b/installer/check.php @@ -68,7 +68,7 @@ echo '\n"; protected $script_tag = ""; + protected $link_css_file = "\n"; protected $default_template = "\n\n\n"; protected $title = ''; @@ -61,6 +63,9 @@ class rcube_html_page if (in_array($file, $sa_files)) { return; } + + $sa_files[] = $file; + if (!is_array($this->script_files[$position])) { $this->script_files[$position] = array(); } @@ -82,6 +87,16 @@ class rcube_html_page } } + /** + * Link an external css file + * + * @param string File URL + */ + public function include_css($file) + { + $this->css_files[] = $file; + } + /** * Add HTML code to the page header * @@ -163,52 +178,53 @@ class rcube_html_page } // replace specialchars in content - $__page_title = Q($this->title, 'show', FALSE); - $__page_header = $__page_body = $__page_footer = ''; + $page_title = Q($this->title, 'show', FALSE); + $page_header = ''; + $page_footer = ''; // include meta tag with charset if (!empty($this->charset)) { if (!headers_sent()) { header('Content-Type: text/html; charset=' . $this->charset); } - $__page_header = 'charset . '" />'."\n"; + $page_header = 'charset . '" />'."\n"; } // definition of the code to be placed in the document header and footer if (is_array($this->script_files['head'])) { foreach ($this->script_files['head'] as $file) { - $__page_header .= sprintf($this->script_tag_file, $file); + $page_header .= sprintf($this->script_tag_file, $file); } } $head_script = $this->scripts['head_top'] . $this->scripts['head']; if (!empty($head_script)) { - $__page_header .= sprintf($this->script_tag, $head_script); + $page_header .= sprintf($this->script_tag, $head_script); } if (!empty($this->header)) { - $__page_header .= $this->header; + $page_header .= $this->header; } if (is_array($this->script_files['foot'])) { foreach ($this->script_files['foot'] as $file) { - $__page_footer .= sprintf($this->script_tag_file, $file); + $page_footer .= sprintf($this->script_tag_file, $file); } } if (!empty($this->scripts['foot'])) { - $__page_footer .= sprintf($this->script_tag, $this->scripts['foot']); + $page_footer .= sprintf($this->script_tag, $this->scripts['foot']); } if (!empty($this->footer)) { - $__page_footer .= $this->footer; + $page_footer .= $this->footer; } // find page header if ($hpos = stripos($output, '')) { - $__page_header .= "\n"; + $page_header .= "\n"; } else { if (!is_numeric($hpos)) { @@ -220,49 +236,43 @@ class rcube_html_page } $hpos++; } - $__page_header = "\n$__page_title\n$__page_header\n\n"; + $page_header = "\n$page_title\n$page_header\n\n"; } // add page hader if ($hpos) { - $output = substr($output,0,$hpos) . $__page_header . substr($output,$hpos,strlen($output)); + $output = substr($output,0,$hpos) . $page_header . substr($output,$hpos,strlen($output)); } else { - $output = $__page_header . $output; + $output = $page_header . $output; } - // find page body - if ($bpos = stripos($output, '')+7; - } - - // add page body - if ($bpos && $__page_body) { - $output = substr($output,0,$bpos) . "\n$__page_body\n" . substr($output,$bpos,strlen($output)); - } - - // find and add page footer + // add page footer if (($fpos = strripos($output, '')) || ($fpos = strripos($output, ''))) { - $output = substr($output, 0, $fpos) . "$__page_footer\n" . substr($output, $fpos); + $output = substr($output, 0, $fpos) . "$page_footer\n" . substr($output, $fpos); } else { - $output .= "\n".$__page_footer; + $output .= "\n".$page_footer; } - // reset those global vars - $__page_header = $__page_footer = ''; + // add css files in head, before scripts, for speed up with parallel downloads + if (!empty($this->css_files) && + (($pos = stripos($output, '