From f619dedc5aa2020eeffa01e05feacedb043ccb66 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 22 Oct 2005 14:17:25 +0000 Subject: Patches for 20051021 release --- UPGRADING | 3 ++- program/include/main.inc | 18 +++++++++--------- program/include/rcube_imap.inc | 4 ++-- program/include/rcube_shared.inc | 2 +- program/localization/de/labels.inc | 2 +- skins/default/includes/header.html | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/UPGRADING b/UPGRADING index bd3950d79..714df94ac 100644 --- a/UPGRADING +++ b/UPGRADING @@ -44,4 +44,5 @@ from version 0.1-20051007 - replace index.php - replace all files in folder /program/ - replace all files in folder /skins/default/ -- add $rcmail_config['smtp_auth_type'] if you need to specify an auth method for SMTP \ No newline at end of file +- add $rcmail_config['smtp_auth_type'] if you need to specify an auth method for SMTP +- $rcmail_config['session_lifetime'] to specify the session lifetime in minutes \ No newline at end of file diff --git a/program/include/main.inc b/program/include/main.inc index f0df4ef65..7955aa870 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -253,6 +253,15 @@ function rcmail_login($user, $pass, $host=NULL) if (!$host) $host = $CONFIG['default_host']; + // parse $host URL + $a_host = parse_url($host); + if ($a_host['host']) + { + $host = $a_host['host']; + $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? TRUE : FALSE; + $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $CONFIG['default_port']); + } + // query if user already registered $sql_result = $DB->query(sprintf("SELECT user_id, username, language, preferences FROM %s @@ -269,15 +278,6 @@ function rcmail_login($user, $pass, $host=NULL) $user = $sql_arr['username']; } - // parse $host URL - $a_host = parse_url($host); - if ($a_host['host']) - { - $host = $a_host['host']; - $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? TRUE : FALSE; - $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $CONFIG['default_port']); - } - // exit if IMAP login failed if (!($imap_login = $IMAP->connect($host, $user, $pass, $imap_port, $imap_ssl))) return FALSE; diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 009c80add..47999c860 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -1086,10 +1086,10 @@ class rcube_imap function _mod_mailbox($mbox, $mode='in') { - if (!empty($this->root_ns) && $this->root_ns == $mbox) + if ((!empty($this->root_ns) && $this->root_ns == $mbox) || ($mbox == 'INBOX' && $mode == 'in')) return $mbox; - if (!empty($this->root_dir) && $mode=='in') + if (!empty($this->root_dir) && $mode=='in') $mbox = $this->root_dir.$this->delimiter.$mbox; else if (strlen($this->root_dir) && $mode=='out') $mbox = substr($mbox, strlen($this->root_dir)+1); diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index 6874094a1..c0df2e585 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -1245,7 +1245,7 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) // encode for javascript use if ($enctype=='js') - return preg_replace(array("/\r\n/", '/"/', "/'/"), array('\n', '\"', "\'"), strtr($str, $js_rep_table)); + return preg_replace(array("/\r\n/", '/"/', "/([^\\\])'/"), array('\n', '\"', "$1\'"), strtr($str, $js_rep_table)); // encode for RTF if ($enctype=='rtf') diff --git a/program/localization/de/labels.inc b/program/localization/de/labels.inc index a5a0a410a..7464c7657 100644 --- a/program/localization/de/labels.inc +++ b/program/localization/de/labels.inc @@ -55,7 +55,7 @@ $labels['reply-to'] = $labels['replyto']; $labels['mailboxlist'] = 'Ordner'; $labels['messagesfromto'] = 'Nachrichten $from bis $to von $count'; -$labels['messagenrof'] = 'Nachrichten $nr von $count'; +$labels['messagenrof'] = 'Nachricht $nr von $count'; $labels['moveto'] = 'Verschieben nach...'; $labels['download'] = 'Download'; diff --git a/skins/default/includes/header.html b/skins/default/includes/header.html index 375140fa1..bcb6efb37 100644 --- a/skins/default/includes/header.html +++ b/skins/default/includes/header.html @@ -7,4 +7,4 @@ - \ No newline at end of file + -- cgit v1.2.3