[Svn] r2483 - in branches/release-0.2.2: . config installer program/include program/js program/lib program/localization program/localization/da_DK program/localization/en_GB program/localization/en_US program/localization/et_EE program/localization/gl_ES program/localization/hy_AM program/localization/id_ID program/localization/it_IT program/localization/ka_GE program/localization/lv_LV program/localization/nb_NO program/localization/nl_BE program/localization/nl_NL program/localization/pl_PL program/localization/pt_BR program/localization/pt_PT program/localization/ro_RO program/localization/ru_RU program/localization/sv_SE program/localization/zh_TW program/steps/mail program/steps/settings skins/default skins/default/templates

trac at roundcube.net trac at roundcube.net
Fri May 15 12:22:30 CEST 2009


Author: thomasb
Date: 2009-05-15 05:22:29 -0500 (Fri, 15 May 2009)
New Revision: 2483

Modified:
   branches/release-0.2.2/CHANGELOG
   branches/release-0.2.2/config/main.inc.php.dist
   branches/release-0.2.2/installer/test.php
   branches/release-0.2.2/program/include/main.inc
   branches/release-0.2.2/program/include/rcmail.php
   branches/release-0.2.2/program/include/rcube_imap.php
   branches/release-0.2.2/program/include/rcube_shared.inc
   branches/release-0.2.2/program/include/rcube_user.php
   branches/release-0.2.2/program/js/app.js
   branches/release-0.2.2/program/js/common.js
   branches/release-0.2.2/program/js/list.js
   branches/release-0.2.2/program/lib/html2text.php
   branches/release-0.2.2/program/lib/imap.inc
   branches/release-0.2.2/program/lib/tnef_decoder.inc
   branches/release-0.2.2/program/localization/da_DK/labels.inc
   branches/release-0.2.2/program/localization/da_DK/messages.inc
   branches/release-0.2.2/program/localization/en_GB/labels.inc
   branches/release-0.2.2/program/localization/en_US/labels.inc
   branches/release-0.2.2/program/localization/et_EE/labels.inc
   branches/release-0.2.2/program/localization/gl_ES/labels.inc
   branches/release-0.2.2/program/localization/gl_ES/messages.inc
   branches/release-0.2.2/program/localization/hy_AM/labels.inc
   branches/release-0.2.2/program/localization/hy_AM/messages.inc
   branches/release-0.2.2/program/localization/id_ID/labels.inc
   branches/release-0.2.2/program/localization/index.inc
   branches/release-0.2.2/program/localization/it_IT/labels.inc
   branches/release-0.2.2/program/localization/ka_GE/labels.inc
   branches/release-0.2.2/program/localization/ka_GE/messages.inc
   branches/release-0.2.2/program/localization/lv_LV/labels.inc
   branches/release-0.2.2/program/localization/lv_LV/messages.inc
   branches/release-0.2.2/program/localization/nb_NO/labels.inc
   branches/release-0.2.2/program/localization/nb_NO/messages.inc
   branches/release-0.2.2/program/localization/nl_BE/labels.inc
   branches/release-0.2.2/program/localization/nl_NL/labels.inc
   branches/release-0.2.2/program/localization/pl_PL/labels.inc
   branches/release-0.2.2/program/localization/pt_BR/labels.inc
   branches/release-0.2.2/program/localization/pt_PT/labels.inc
   branches/release-0.2.2/program/localization/ro_RO/labels.inc
   branches/release-0.2.2/program/localization/ro_RO/messages.inc
   branches/release-0.2.2/program/localization/ru_RU/labels.inc
   branches/release-0.2.2/program/localization/sv_SE/labels.inc
   branches/release-0.2.2/program/localization/zh_TW/labels.inc
   branches/release-0.2.2/program/localization/zh_TW/messages.inc
   branches/release-0.2.2/program/steps/mail/attachments.inc
   branches/release-0.2.2/program/steps/mail/autocomplete.inc
   branches/release-0.2.2/program/steps/mail/compose.inc
   branches/release-0.2.2/program/steps/mail/func.inc
   branches/release-0.2.2/program/steps/mail/list.inc
   branches/release-0.2.2/program/steps/mail/sendmail.inc
   branches/release-0.2.2/program/steps/settings/edit_identity.inc
   branches/release-0.2.2/program/steps/settings/func.inc
   branches/release-0.2.2/program/steps/settings/save_identity.inc
   branches/release-0.2.2/skins/default/common.css
   branches/release-0.2.2/skins/default/mail.css
   branches/release-0.2.2/skins/default/print.css
   branches/release-0.2.2/skins/default/settings.css
   branches/release-0.2.2/skins/default/templates/addressbook.html
   branches/release-0.2.2/skins/default/templates/mail.html
   branches/release-0.2.2/skins/default/templates/managefolders.html
Log:
Apply changes from r2348 to r2400 for 0.2.2 release

Modified: branches/release-0.2.2/CHANGELOG
===================================================================
--- branches/release-0.2.2/CHANGELOG	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/CHANGELOG	2009-05-15 10:22:29 UTC (rev 2483)
@@ -1,6 +1,31 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix quicksearchbox look in Chrome and Konqueror (#1484841)
+- Fix UTF-8 byte-order mark removing (#1485514)
+- Fix folders subscribtions on Konqueror (#1484841) 
+- Fix debug console on Konqueror and Safari
+- Fix messagelist focus issue when modifying status of selected messages (#1485807)
+- Support STARTTLS in IMAP connection (#1485284)
+- Fix DEL key problem in search boxes (#1485528)
+- Support several e-mail addresses per user from virtuser_file (#1485678)
+- Fix drag&drop with scrolling on IE (#1485786)
+- Fix adding signature separator in html mode (#1485350)
+- Fix opening attachment marks message as read (#1485803)
+- Fix 'temp_dir' does not support relative path under Windows (#1484529)
+- Fix "Initialize Database" button missing from installer (#1485802)
+- Fix compose window doesn't fit 1024x768 window (#1485396)
+- Fix service not available error when pressing back from compose dialog (#1485552)
+- Fix using mail() on Windows (#1485779)
+- Fix word wrapping in message-part's <PRE>s for printing (#1485787)
+- Fix incorrect word wrapping in outgoing plaintext multibyte messages (#1485714)
+- Fix double footer in HTML message with embedded images
+- Fix TNEF implementation bug (#1485773)
+- Fix incorrect row id parsing for LDAP contacts list (#1485784) 
+- Fix 'mode' parameter in sqlite DSN (#1485772)
+
+RELEASE 0.2.1
+------------------
 - Use US-ASCII as failover when Unicode searching fails (#1485762)
 - Fix errors handling in IMAP command continuations (#1485762)
 - Fix FETCH result parsing for servers returning flags at the end of result (#1485763)

Modified: branches/release-0.2.2/config/main.inc.php.dist
===================================================================
--- branches/release-0.2.2/config/main.inc.php.dist	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/config/main.inc.php.dist	2009-05-15 10:22:29 UTC (rev 2483)
@@ -51,7 +51,7 @@
 // the mail host chosen to perform the log-in
 // leave blank to show a textbox at login, give a list of hosts
 // to display a pulldown menu or set one host as string.
-// To use SSL connection, enter ssl://hostname:993
+// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
 $rcmail_config['default_host'] = '';
 
 // TCP port used for IMAP connections
@@ -152,7 +152,7 @@
 $rcmail_config['date_today'] = 'H:i';
 
 // add this user-agent to message headers when sending
-$rcmail_config['useragent'] = 'RoundCube Webmail/0.2.1';
+$rcmail_config['useragent'] = 'RoundCube Webmail/0.2.2';
 
 // use this name to compose page titles
 $rcmail_config['product_name'] = 'RoundCube Webmail';

Modified: branches/release-0.2.2/installer/test.php
===================================================================
--- branches/release-0.2.2/installer/test.php	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/installer/test.php	2009-05-15 10:22:29 UTC (rev 2483)
@@ -159,7 +159,7 @@
 // test database
 if ($db_working) {
     $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_table_users']}");
-    if (!$db_read) {
+    if ($DB->db_error) {
         $RCI->fail('DB Schema', "Database not initialized");
         echo '<p><input type="submit" name="initdb" value="Initialize database" /></p>';
         $db_working = false;

Modified: branches/release-0.2.2/program/include/main.inc
===================================================================
--- branches/release-0.2.2/program/include/main.inc	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/program/include/main.inc	2009-05-15 10:22:29 UTC (rev 2483)
@@ -192,7 +192,7 @@
   if ($to == 'UNICODE-1-1-UTF-7')
     $to = 'UTF-7';
 
-  if ($from==$to || $str=='' || empty($from))
+  if ($from == $to || empty($str) || empty($from))
     return $str;
     
   $aliases = array(
@@ -246,6 +246,8 @@
   if ($from == 'UTF-7') {
     if ($_str = utf7_to_utf8($str))
       $str = $_str;
+    else
+      $error = true;
   }
   else if (($from == 'ISO-8859-1') && function_exists('utf8_encode')) {
     $str = utf8_encode($str);
@@ -254,7 +256,7 @@
     $conv->loadCharset($from);
     $str = $conv->strToUtf8($str);
   }
-  else if ($from != 'UTF-8') {}
+  else if ($from != 'UTF-8')
     $error = true;
 
   // encode string for output
@@ -278,7 +280,7 @@
       'code' => 500,
       'type' => 'php',
       'file' => __FILE__,
-      'message' => "Could not convert string charset. Make sure iconv is installed or lib/utf8.class is available"
+      'message' => "Could not convert string from $from to $to. Make sure iconv is installed or lib/utf8.class is available"
       ), true, false);
     
     $convert_warning = true;

Modified: branches/release-0.2.2/program/include/rcmail.php
===================================================================
--- branches/release-0.2.2/program/include/rcmail.php	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/program/include/rcmail.php	2009-05-15 10:22:29 UTC (rev 2483)
@@ -436,12 +436,14 @@
     if ($a_host['host']) {
       $host = $a_host['host'];
       $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null;
-      $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $config['default_port']);
+      if(!empty($a_host['port']))
+        $imap_port = $a_host['port'];
+      else if ($imap_ssl && $imap_ssl != 'tls')
+        $imap_port = 993;
     }
-    else
-      $imap_port = $config['default_port'];
+    
+    $imap_port = $imap_port ? $imap_port : $config['default_port'];
 
-
     /* Modify username with domain if required  
        Inspired by Marco <P0L0_notspam_binware.org>
     */
@@ -453,9 +455,10 @@
         $username .= '@'.$config['username_domain'];
     }
 
-    // try to resolve email address from virtuser table    
-    if (!empty($config['virtuser_file']) && strpos($username, '@'))
-      $username = rcube_user::email2user($username);
+    // try to resolve email address from virtuser table
+    if (strpos($username, '@'))
+      if ($virtuser = rcube_user::email2user($username))
+        $username = $virtuser;
 
     // lowercase username if it's an e-mail address (#1484473)
     if (strpos($username, '@'))

Modified: branches/release-0.2.2/program/include/rcube_imap.php
===================================================================
--- branches/release-0.2.2/program/include/rcube_imap.php	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/program/include/rcube_imap.php	2009-05-15 10:22:29 UTC (rev 2483)
@@ -97,7 +97,7 @@
     global $ICL_SSL, $ICL_PORT, $IMAP_USE_INTERNAL_DATE;
     
     // check for Open-SSL support in PHP build
-    if ($use_ssl && in_array('openssl', get_loaded_extensions()))
+    if ($use_ssl && extension_loaded('openssl'))
       $ICL_SSL = $use_ssl == 'imaps' ? 'ssl' : $use_ssl;
     else if ($use_ssl)
       {

Modified: branches/release-0.2.2/program/include/rcube_shared.inc
===================================================================
--- branches/release-0.2.2/program/include/rcube_shared.inc	2009-05-15 10:06:16 UTC (rev 2482)
+++ branches/release-0.2.2/program/include/rcube_shared.inc	2009-05-15 10:22:29 UTC (rev 2483)
@@ -405,7 +405,55 @@
     return strrpos($haystack, $needle, $offset);
 }
 
+/**
+ * Wrapper function for wordwrap
+ */
+function rc_wordwrap($string, $width=75, $brea