[Svn] r4469 - in branches/release-0.5: . SQL installer program/include program/js program/js/tiny_mce/themes/advanced/langs program/lib/Net program/localization/az_AZ program/localization/bg_BG program/localization/da_DK program/localization/de_DE program/localization/fr_FR program/localization/he_IL program/localization/hu_HU program/localization/it_IT program/localization/ja_JP program/localization/pt_PT program/localization/ru_RU program/localization/sk_SK program/localization/sv_SE program/localization/zh_TW program/steps/addressbook program/steps/mail program/steps/settings skins/default skins/default/templates

trac at roundcube.net trac at roundcube.net
Sat Jan 29 15:55:13 CET 2011


Author: thomasb
Date: 2011-01-29 08:55:12 -0600 (Sat, 29 Jan 2011)
New Revision: 4469

Modified:
   branches/release-0.5/CHANGELOG
   branches/release-0.5/INSTALL
   branches/release-0.5/SQL/mysql.update.sql
   branches/release-0.5/SQL/postgres.update.sql
   branches/release-0.5/SQL/sqlite.update.sql
   branches/release-0.5/index.php
   branches/release-0.5/installer/check.php
   branches/release-0.5/program/include/iniset.php
   branches/release-0.5/program/include/main.inc
   branches/release-0.5/program/include/rcmail.php
   branches/release-0.5/program/include/rcube_html_page.php
   branches/release-0.5/program/include/rcube_imap.php
   branches/release-0.5/program/include/rcube_plugin_api.php
   branches/release-0.5/program/include/rcube_template.php
   branches/release-0.5/program/js/app.js
   branches/release-0.5/program/js/tiny_mce/themes/advanced/langs/sv_dlg.js
   branches/release-0.5/program/lib/Net/IDNA2.php
   branches/release-0.5/program/lib/Net/Socket.php
   branches/release-0.5/program/localization/az_AZ/labels.inc
   branches/release-0.5/program/localization/az_AZ/messages.inc
   branches/release-0.5/program/localization/bg_BG/labels.inc
   branches/release-0.5/program/localization/bg_BG/messages.inc
   branches/release-0.5/program/localization/da_DK/labels.inc
   branches/release-0.5/program/localization/da_DK/messages.inc
   branches/release-0.5/program/localization/de_DE/labels.inc
   branches/release-0.5/program/localization/de_DE/messages.inc
   branches/release-0.5/program/localization/fr_FR/labels.inc
   branches/release-0.5/program/localization/fr_FR/messages.inc
   branches/release-0.5/program/localization/he_IL/labels.inc
   branches/release-0.5/program/localization/he_IL/messages.inc
   branches/release-0.5/program/localization/hu_HU/labels.inc
   branches/release-0.5/program/localization/it_IT/labels.inc
   branches/release-0.5/program/localization/it_IT/messages.inc
   branches/release-0.5/program/localization/ja_JP/labels.inc
   branches/release-0.5/program/localization/ja_JP/messages.inc
   branches/release-0.5/program/localization/pt_PT/labels.inc
   branches/release-0.5/program/localization/pt_PT/messages.inc
   branches/release-0.5/program/localization/ru_RU/labels.inc
   branches/release-0.5/program/localization/ru_RU/messages.inc
   branches/release-0.5/program/localization/sk_SK/labels.inc
   branches/release-0.5/program/localization/sk_SK/messages.inc
   branches/release-0.5/program/localization/sv_SE/labels.inc
   branches/release-0.5/program/localization/sv_SE/messages.inc
   branches/release-0.5/program/localization/zh_TW/labels.inc
   branches/release-0.5/program/localization/zh_TW/messages.inc
   branches/release-0.5/program/steps/addressbook/save.inc
   branches/release-0.5/program/steps/mail/func.inc
   branches/release-0.5/program/steps/settings/folders.inc
   branches/release-0.5/program/steps/settings/func.inc
   branches/release-0.5/program/steps/settings/save_prefs.inc
   branches/release-0.5/skins/default/common.css
   branches/release-0.5/skins/default/ie6hacks.css
   branches/release-0.5/skins/default/iehacks.css
   branches/release-0.5/skins/default/mail.css
   branches/release-0.5/skins/default/templates/addressbook.html
   branches/release-0.5/skins/default/templates/message.html
   branches/release-0.5/skins/default/templates/messagepreview.html
Log:
Apply bug fixes and localization updated from trunk for release 0.5.1

Modified: branches/release-0.5/CHANGELOG
===================================================================
--- branches/release-0.5/CHANGELOG	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/CHANGELOG	2011-01-29 14:55:12 UTC (rev 4469)
@@ -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 <html><body> and add Doctype declaration (#1487098)
 - Make rcube_autoload silently skip unknown classes (#1487109)

Modified: branches/release-0.5/INSTALL
===================================================================
--- branches/release-0.5/INSTALL	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/INSTALL	2011-01-29 14:55:12 UTC (rev 4469)
@@ -11,7 +11,7 @@
 
 * 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)

Modified: branches/release-0.5/SQL/mysql.update.sql
===================================================================
--- branches/release-0.5/SQL/mysql.update.sql	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/SQL/mysql.update.sql	2011-01-29 14:55:12 UTC (rev 4469)
@@ -131,3 +131,5 @@
 
 ALTER TABLE `contacts` MODIFY `email` varchar(255) NOT NULL;
 
+TRUNCATE TABLE `messages`;
+

Modified: branches/release-0.5/SQL/postgres.update.sql
===================================================================
--- branches/release-0.5/SQL/postgres.update.sql	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/SQL/postgres.update.sql	2011-01-29 14:55:12 UTC (rev 4469)
@@ -88,3 +88,4 @@
 ALTER TABLE users ADD UNIQUE (username, mail_host);
 ALTER TABLE contacts ALTER email TYPE varchar(255);
 
+TRUNCATE messages;

Modified: branches/release-0.5/SQL/sqlite.update.sql
===================================================================
--- branches/release-0.5/SQL/sqlite.update.sql	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/SQL/sqlite.update.sql	2011-01-29 14:55:12 UTC (rev 4469)
@@ -180,3 +180,5 @@
 CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);
 DROP TABLE contacts_tmp;
 
+DELETE FROM messages;
+

Modified: branches/release-0.5/index.php
===================================================================
--- branches/release-0.5/index.php	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/index.php	2011-01-29 14:55:12 UTC (rev 4469)
@@ -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 @@
     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

Modified: branches/release-0.5/installer/check.php
===================================================================
--- branches/release-0.5/installer/check.php	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/installer/check.php	2011-01-29 14:55:12 UTC (rev 4469)
@@ -68,7 +68,7 @@
 <h3>Checking PHP version</h3>
 <?php
 
-define('MIN_PHP_VERSION', '5.2.0');
+define('MIN_PHP_VERSION', '5.2.1');
 if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '>=')) {
     $RCI->pass('Version', 'PHP ' . PHP_VERSION . ' detected');
 } else {

Modified: branches/release-0.5/program/include/iniset.php
===================================================================
--- branches/release-0.5/program/include/iniset.php	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/program/include/iniset.php	2011-01-29 14:55:12 UTC (rev 4469)
@@ -36,7 +36,7 @@
 }
 
 // application constants
-define('RCMAIL_VERSION', '0.5');
+define('RCMAIL_VERSION', '0.5.1');
 define('RCMAIL_CHARSET', 'UTF-8');
 define('JS_OBJECT_NAME', 'rcmail');
 define('RCMAIL_START', microtime(true));

Modified: branches/release-0.5/program/include/main.inc
===================================================================
--- branches/release-0.5/program/include/main.inc	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/program/include/main.inc	2011-01-29 14:55:12 UTC (rev 4469)
@@ -861,8 +861,8 @@
   $replacements = new rcube_string_replacer;
 
   // ignore the whole block if evil styles are detected
-  $stripped = preg_replace('/[^a-z\(:]/', '', rcmail_xss_entity_decode($source));
-  if (preg_match('/expression|behavior|url\(|import/', $stripped))
+  $stripped = preg_replace('/[^a-z\(:;]/', '', rcmail_xss_entity_decode($source));
+  if (preg_match('/expression|behavior|url\(|import[^a]/', $stripped))
     return '/* evil! */';
 
   // remove css comments (sometimes used for some ugly hacks)
@@ -1771,16 +1771,17 @@
  * Replaces hostname variables
  *
  * @param string $name Hostname
+ * @param string $host Optional IMAP hostname
  * @return string
  */
-function rcube_parse_host($name)
+function rcube_parse_host($name, $host='')
 {
   // %n - host
   $n = preg_replace('/:\d+$/', '', $_SERVER['SERVER_NAME']);
   // %d - domain name without first part, e.g. %d=mail.domain.tld, %m=domain.tld
   $d = preg_replace('/^[^\.]+\./', '', $n);
   // %h - IMAP host
-  $h = $_SESSION['imap_host'];
+  $h = $_SESSION['imap_host'] ? $_SESSION['imap_host'] : $host;
   // %z - IMAP domain without first part, e.g. %h=imap.domain.tld, %z=domain.tld
   $z = preg_replace('/^[^\.]+\./', '', $h);
 

Modified: branches/release-0.5/program/include/rcmail.php
===================================================================
--- branches/release-0.5/program/include/rcmail.php	2011-01-29 14:27:00 UTC (rev 4468)
+++ branches/release-0.5/program/include/rcmail.php	2011-01-29 14:55:12 UTC (rev 4469)
@@ -673,9 +673,9 @@
     // Check if we need to add domain
     if (!empty($config['username_domain']) && strpos($username, '@') === false) {
       if (is_array($config['username_domain']) && isset($config['username_domain'][$host]))
-        $username .= '@'.rcube_parse_host($config['username_domain'][$host]);
+        $username .= '@'.rcube_parse_host($config['username_domain'][$host], $host);
       else if (is_string($config['username_domain']))
-        $username .= '@'.rcube_parse_host($config['username_domain']);
+        $username .= '@'.rcube_parse_host($config['username_domain'], $host);
     }
 
     // Convert username to lowercase. If IMAP backend

Modified: branches/release-0.5/program/include/rcube_html_page.php
==========