Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2021-10-28 15:39:34 +0300
committerAleksander Machniak <alec@alec.pl>2021-10-28 15:40:19 +0300
commitd203db0366df8fb438e6433cc31926019a32881f (patch)
tree75e8b2d56ec927581bbe22ef2e93c2b0929e388a
parent2852ffaeeb42ed479f9e1f44abff68efdbc3d46f (diff)
Fix bug where adding a contact to trusted senders via "Always allow from..." button didn't work (#8264, #8268)
...if the contact already existed in Personal addresses (or another default contacts source)
-rw-r--r--CHANGELOG.md2
-rw-r--r--program/actions/mail/show.php3
-rw-r--r--program/js/app.js6
3 files changed, 7 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 76e8d4b48..c44589d96 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,8 @@
- Fix bug in Larry skin where headers toggle state was reset on full page preview (#8203)
- Fix bug where \u200b characters were added into the recipient input preventing mail delivery (#8269)
- Fix charset conversion errors on PHP < 8 for charsets not supported by mbstring (#8252)
+- Fix bug where adding a contact to trusted senders via "Always allow from..." button didn't work
+ if the contact already existed in Personal addresses (or another default contacts source) (#8264, #8268)
## Release 1.5.0
diff --git a/program/actions/mail/show.php b/program/actions/mail/show.php
index a2387a3d3..c78b662f5 100644
--- a/program/actions/mail/show.php
+++ b/program/actions/mail/show.php
@@ -263,9 +263,10 @@ class rcmail_action_mail_show extends rcmail_action_mail_index
// add link to save sender in addressbook and reload message
$show_images = $rcmail->config->get('show_images');
if (!empty(self::$MESSAGE->sender['mailto']) && ($show_images == 1 || $show_images == 3)) {
+ $arg = $show_images == 1 ? rcube_addressbook::TYPE_TRUSTED_SENDER : 'true';
$buttons .= ' ' . html::a([
'href' => "#loadremotealways",
- 'onclick' => rcmail_output::JS_OBJECT_NAME . ".command('load-remote', true)",
+ 'onclick' => rcmail_output::JS_OBJECT_NAME . ".command('load-remote', $arg)",
'style' => "white-space:nowrap"
],
rcube::Q($rcmail->gettext(['name' => 'alwaysallow', 'vars' => ['sender' => self::$MESSAGE->sender['mailto']]]))
diff --git a/program/js/app.js b/program/js/app.js
index 0c5440637..ed3d49df2 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1095,7 +1095,7 @@ function rcube_webmail()
case 'load-remote':
if (this.env.uid) {
if (props && this.env.sender) {
- this.add_contact(this.env.sender, true);
+ this.add_contact(this.env.sender, true, props);
break;
}
@@ -5612,10 +5612,10 @@ function rcube_webmail()
};
// send remote request to add a new contact
- this.add_contact = function(value, reload)
+ this.add_contact = function(value, reload, source)
{
if (value)
- this.http_post('addcontact', {_address: value, _reload: reload});
+ this.http_post('addcontact', {_address: value, _reload: reload, _source: source});
};
// send remote request to search mail or contacts