Markasjunk: Fix bug where marking as spam/ham didn't work on moving messages with drag-and-drop (#7137)

bnet/additions
Aleksander Machniak 4 years ago
parent 3819e4e640
commit 9d4638d94e

@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail
- Enigma: Fix so using list checkbox selection does not load the key preview frame
- Enigma: Fix generation of key pairs for identities with IDN domains (#7181)
- Enigma: Display IDN domains of key users and identities in UTF8
- Markasjunk: Fix bug where marking as spam/ham didn't work on moving messages with drag-and-drop (#7137)
- Password: Make chpass-wrapper.py Python 3 compatible (#7135)
- Elastic: Fix disappearing sidebar in mail compose after clicking Mail button
- Elastic: Fix incorrect aria-disabled attribute on Mail taskmenu button in mail compose

@ -102,8 +102,11 @@ class markasjunk_cmd_learn
$output = shell_exec($tmp_command);
if ($debug) {
if ($output) {
$tmp_command .= "\n$output";
}
rcube::write_log('markasjunk', $tmp_command);
rcube::write_log('markasjunk', $output);
}
if (strpos($command, '%f') !== false) {

@ -111,17 +111,22 @@ if (window.rcmail) {
rcmail.addEventListener('listupdate', function() { rcmail.markasjunk_toggle_button(); });
rcmail.addEventListener('beforemoveto', function(mbox) {
if (mbox && typeof mbox === 'object')
rcmail.addEventListener('beforemove', function(mbox) {
if (mbox && typeof mbox === 'object') {
mbox = mbox.id;
}
if (!mbox) {
return;
}
var is_spam = null;
// check if destination mbox equals junk box (and we're not already in the junk box)
if (rcmail.env.markasjunk_move_spam && mbox && mbox == rcmail.env.markasjunk_spam_mailbox && mbox != rcmail.env.mailbox)
if (rcmail.env.markasjunk_move_spam && mbox == rcmail.env.markasjunk_spam_mailbox && mbox != rcmail.env.mailbox)
is_spam = true;
// or if destination mbox equals ham box and we are in the junk box
else if (rcmail.env.markasjunk_move_ham && mbox && mbox == rcmail.env.markasjunk_ham_mailbox && rcmail.env.mailbox == rcmail.env.markasjunk_spam_mailbox)
else if (rcmail.env.markasjunk_move_ham && mbox == rcmail.env.markasjunk_ham_mailbox && rcmail.env.mailbox == rcmail.env.markasjunk_spam_mailbox)
is_spam = false;
if (is_spam !== null) {

Loading…
Cancel
Save