From 1fd43b0bdd404ff279e769d61e3d8cc846a73245 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 1 Sep 2021 16:23:38 +0200 Subject: [PATCH] * Mail: fix updating/deleting mail accounts does not refresh the mail tree no more --- admin/inc/class.admin_mail.inc.php | 4 ++-- mail/inc/class.mail_hooks.inc.php | 3 +++ mail/js/app.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_mail.inc.php b/admin/inc/class.admin_mail.inc.php index 4325d06eb2..9d4b8311de 100644 --- a/admin/inc/class.admin_mail.inc.php +++ b/admin/inc/class.admin_mail.inc.php @@ -1122,7 +1122,7 @@ class admin_mail } if ($content['acc_id']) Mail::unsetCachedObjects($content['acc_id']); if (stripos($msg,'fatal error:')!==false) $msg_type = 'error'; - Framework::refresh_opener($msg, 'emailadmin', $content['acc_id'], $new_account ? 'add' : 'update', null, null, null, $msg_type); + Framework::refresh_opener($msg, 'mail-account', $content['acc_id'], $new_account ? 'add' : 'update', null, null, null, $msg_type); if ($button == 'save') Framework::window_close(); break; @@ -1135,7 +1135,7 @@ class admin_mail elseif (Mail\Account::delete($content['acc_id']) > 0) { if ($content['acc_id']) Mail::unsetCachedObjects($content['acc_id']); - Framework::refresh_opener(lang('Account deleted.'), 'emailadmin', $content['acc_id'], 'delete'); + Framework::refresh_opener(lang('Account deleted.'), 'mail-account', $content['acc_id'], 'delete'); Framework::window_close(); } else diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index add5ec6761..1760576e58 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -107,6 +107,9 @@ class mail_hooks ), 'entry' => 'Mail', 'entries' => 'Mails', + 'additional' => [ + 'mail-account' => [] + ] ); } diff --git a/mail/js/app.js b/mail/js/app.js index 3a11e22c6e..08019a8055 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -595,7 +595,7 @@ app.classes.mail = AppJS.extend( if (_type === 'delete' && !this.egw.dataHasUID('mail::'+_id)) return false; break; - case 'emailadmin': // update tree with given mail account _id and _type + case 'mail-account': // update tree with given mail account _id and _type var tree = this.et2 ? this.et2.getWidgetById(this.nm_index+'[foldertree]') : null; if (!tree) break; var node = tree.getNode(_id);