From 56376465f2ee4d41012d43d72664235068ace332 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 24 Jul 2020 14:38:33 +0200 Subject: [PATCH] Make sure draft folder contains profile id when using it as folder option --- mail/inc/class.mail_ui.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 07cd978289..99f2927291 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -3824,7 +3824,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2); } } if (!is_array($content)) $content = array(); - if (empty($content['FOLDER'])) $content['FOLDER']=(array)$this->mail_bo->getDraftFolder(); + if (empty($content['FOLDER'])) + { + $draft = $this->mail_bo->getDraftFolder(); + $content['FOLDER']=(array)(preg_match($draft, "/::/") ? $draft : $this->mail_bo->profileID.'::'.$draft); + } if (!empty($content['FOLDER'])) { $compose = new mail_compose();