diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-21 11:23:17 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-21 11:23:17 +0200 |
commit | 74d7841c2643434fbd3e8759f160bda05f82ab0d (patch) | |
tree | 8d94c1e21d9b2c103f52d13e1ea0a0d7f64a1a70 /program | |
parent | 9cb76ad3c2ebcf6f75053de2e686390470dce7ba (diff) | |
parent | ae7027de029e28fdd3894efe919b6171b2b11eab (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Conflicts:
CHANGELOG
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube.php | 5 | ||||
-rw-r--r-- | program/include/rcube_output_html.php | 5 | ||||
-rw-r--r-- | program/include/rcube_utils.php | 5 | ||||
-rw-r--r-- | program/js/app.js | 8 | ||||
-rw-r--r-- | program/js/common.js | 1 | ||||
-rw-r--r-- | program/js/googiespell.js | 4 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 5 | ||||
-rw-r--r-- | program/localization/pl_PL/labels.inc | 1 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 4 |
9 files changed, 31 insertions, 7 deletions
diff --git a/program/include/rcube.php b/program/include/rcube.php index 84014ef5c..0e40b3c6b 100644 --- a/program/include/rcube.php +++ b/program/include/rcube.php @@ -405,12 +405,17 @@ class rcube $sess_name = $this->config->get('session_name'); $sess_domain = $this->config->get('session_domain'); + $sess_path = $this->config->get('session_path'); $lifetime = $this->config->get('session_lifetime', 0) * 60; // set session domain if ($sess_domain) { ini_set('session.cookie_domain', $sess_domain); } + // set session path + if ($sess_path) { + ini_set('session.cookie_path', $sess_path); + } // set session garbage collecting time according to session_lifetime if ($lifetime) { ini_set('session.gc_maxlifetime', $lifetime * 2); diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php index 0a8f0e364..a071ee354 100644 --- a/program/include/rcube_output_html.php +++ b/program/include/rcube_output_html.php @@ -67,6 +67,11 @@ class rcube_output_html extends rcube_output $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); + // add cookie info + $this->set_env('cookie_domain', ini_get('session.cookie_domain')); + $this->set_env('cookie_path', ini_get('session.cookie_path')); + $this->set_env('cookie_secure', ini_get('session.cookie_secure')); + // load the correct skin (in case user-defined) $skin = $this->config->get('skin'); $this->set_skin($skin); diff --git a/program/include/rcube_utils.php b/program/include/rcube_utils.php index d1a8315ec..9f18b79c4 100644 --- a/program/include/rcube_utils.php +++ b/program/include/rcube_utils.php @@ -110,6 +110,11 @@ class rcube_utils } } + // last domain part + if (preg_match('/[^a-zA-Z]/', array_pop($domain_array))) { + return false; + } + $rcube = rcube::get_instance(); if (!$dns_check || !$rcube->config->get('email_dns_check')) { diff --git a/program/js/app.js b/program/js/app.js index e8bb6c1a7..9ca16b39c 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6585,6 +6585,12 @@ function rcube_webmail() return 0; }; + // Cookie setter + this.set_cookie = function(name, value, expires) + { + setCookie(name, value, expires, this.env.cookie_path, this.env.cookie_domain, this.env.cookie_secure); + } + } // end object rcube_webmail @@ -6615,6 +6621,8 @@ rcube_webmail.long_subject_title_ie = function(elem, indent) } }; +rcube_webmail.prototype.get_cookie = getCookie; + // copy event engine prototype rcube_webmail.prototype.addEventListener = rcube_event_engine.prototype.addEventListener; rcube_webmail.prototype.removeEventListener = rcube_event_engine.prototype.removeEventListener; diff --git a/program/js/common.js b/program/js/common.js index fdef3453e..a08387ecb 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -635,6 +635,7 @@ function getCookie(name) return unescape(dc.substring(begin + prefix.length, end)); }; +// deprecated aliases, to be removed, use rcmail.set_cookie/rcmail.get_cookie roundcube_browser.prototype.set_cookie = setCookie; roundcube_browser.prototype.get_cookie = getCookie; diff --git a/program/js/googiespell.js b/program/js/googiespell.js index 9f1b41bb2..478858bac 100644 --- a/program/js/googiespell.js +++ b/program/js/googiespell.js @@ -25,7 +25,7 @@ var GOOGIE_CUR_LANG, function GoogieSpell(img_dir, server_url, has_dict) { var ref = this, - cookie_value = getCookie('language'); + cookie_value = rcmail.get_cookie('language'); GOOGIE_CUR_LANG = cookie_value != null ? cookie_value : GOOGIE_DEFAULT_LANG; @@ -150,7 +150,7 @@ this.setCurrentLanguage = function(lan_code) //Set cookie var now = new Date(); now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); - setCookie('language', lan_code, now); + rcmail.set_cookie('language', lan_code, now); }; this.setForceWidthHeight = function(width, height) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 94bae1974..6085b3898 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -1,7 +1,6 @@ <?php /* - +-----------------------------------------------------------------------+ | language/en_US/labels.inc | | | @@ -15,9 +14,6 @@ +-----------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | +-----------------------------------------------------------------------+ - - @version $Id$ - */ $labels = array(); @@ -163,6 +159,7 @@ $labels['unread'] = 'Unread'; $labels['flagged'] = 'Flagged'; $labels['unanswered'] = 'Unanswered'; $labels['deleted'] = 'Deleted'; +$labels['undeleted'] = 'Not deleted'; $labels['invert'] = 'Invert'; $labels['filter'] = 'Filter'; $labels['list'] = 'List'; diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc index 92da1f6ef..d5ffcaa61 100644 --- a/program/localization/pl_PL/labels.inc +++ b/program/localization/pl_PL/labels.inc @@ -134,6 +134,7 @@ $labels['unread'] = 'Nieprzeczytane'; $labels['flagged'] = 'Oznaczone'; $labels['unanswered'] = 'Bez odpowiedzi'; $labels['deleted'] = 'Usunięte'; +$labels['undeleted'] = 'Nieusunięte'; $labels['invert'] = 'Odwróć'; $labels['filter'] = 'Filtr'; $labels['list'] = 'Lista'; diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 3d65eacb1..7f0b4db5b 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1712,8 +1712,10 @@ function rcmail_search_filter($attrib) $select_filter->add(rcube_label('unread'), 'UNSEEN'); $select_filter->add(rcube_label('flagged'), 'FLAGGED'); $select_filter->add(rcube_label('unanswered'), 'UNANSWERED'); - if (!$CONFIG['skip_deleted']) + if (!$CONFIG['skip_deleted']) { $select_filter->add(rcube_label('deleted'), 'DELETED'); + $select_filter->add(rcube_label('undeleted'), 'UNDELETED'); + } $select_filter->add(rcube_label('priority').': '.rcube_label('highest'), 'HEADER X-PRIORITY 1'); $select_filter->add(rcube_label('priority').': '.rcube_label('high'), 'HEADER X-PRIORITY 2'); $select_filter->add(rcube_label('priority').': '.rcube_label('normal'), 'NOT HEADER X-PRIORITY 1 NOT HEADER X-PRIORITY 2 NOT HEADER X-PRIORITY 4 NOT HEADER X-PRIORITY 5'); |