summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-03-05 14:02:34 +0100
committerAleksander Machniak <alec@alec.pl>2014-03-05 14:02:34 +0100
commitaa058736111255cfd43e75d1c340d23879663ee2 (patch)
tree508e41ac91953344aa70e93e56bdc8a0de309d57 /program
parent18a9b4f2f1cbac734d2d16252b45d7ab11bc746f (diff)
parent324805e180d56bcec52b77d27c752ed2479ce466 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js26
-rw-r--r--program/lib/Roundcube/rcube_db_mysql.php4
2 files changed, 22 insertions, 8 deletions
diff --git a/program/js/app.js b/program/js/app.js
index dad4223b2..28a1b38ab 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -650,11 +650,16 @@ function rcube_webmail()
var form = this.gui_objects.messageform,
win = this.open_window('');
- this.save_compose_form_local();
- $("input[name='_action']", form).val('compose');
- form.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 });
- form.target = win.name;
- form.submit();
+ if (win) {
+ this.save_compose_form_local();
+ $("input[name='_action']", form).val('compose');
+ form.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 });
+ form.target = win.name;
+ form.submit();
+ }
+ else {
+ // this.display_message(this.get_label('windowopenerror'), 'error');
+ }
}
else {
this.open_window(this.env.permaurl, true);
@@ -3094,7 +3099,12 @@ function rcube_webmail()
// close compose step in opener
if (opener_rc && opener_rc.env.action == 'compose') {
- setTimeout(function(){ opener.history.back(); }, 100);
+ setTimeout(function(){
+ if (opener.history.length > 1)
+ opener.history.back();
+ else
+ opener_rc.redirect(opener_rc.get_task_url('mail'));
+ }, 100);
this.env.opened_extwin = true;
}
@@ -3618,6 +3628,10 @@ function rcube_webmail()
this.env.draft_id = id;
$("input[name='_draft_saveid']").val(id);
+ // reset history of hidden iframe used for saving draft (#1489643)
+ if (window.frames['savetarget'] && window.frames['savetarget'].history) {
+ window.frames['savetarget'].history.back();
+ }
}
// always remove local copy upon saving as draft
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index d3d0ac5c8..e6417cc0a 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -128,11 +128,11 @@ class rcube_db_mysql extends rcube_db
$result = array();
if (!empty($dsn['key'])) {
- $result[PDO::MYSQL_ATTR_KEY] = $dsn['key'];
+ $result[PDO::MYSQL_ATTR_SSL_KEY] = $dsn['key'];
}
if (!empty($dsn['cipher'])) {
- $result[PDO::MYSQL_ATTR_CIPHER] = $dsn['cipher'];
+ $result[PDO::MYSQL_ATTR_SSL_CIPHER] = $dsn['cipher'];
}
if (!empty($dsn['cert'])) {