From c1aa7c16bf05c1cc83bd646fe398f12296ba7075 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 7 Mar 2017 14:05:42 +0100 Subject: [PATCH] Creating folder on not active profile can be handled by changeProfile --- mail/inc/class.mail_ui.inc.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 88b296781b..502f03a6f5 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -3755,8 +3755,9 @@ $filter['before']= date("d-M-Y", $cutoffdate2); list($profileID,$p_no_delimiter) = explode(self::$delimiter,$parent,2); - if (is_numeric($profileID) && $profileID == $this->mail_bo->profileID) + if (is_numeric($profileID)) { + if ($profileID != $this->mail_bo->profileID) $this->changeProfile ($profileID); $delimiter = $this->mail_bo->getHierarchyDelimiter(false); $parts = explode($delimiter,$new); @@ -3809,12 +3810,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2); } if (!empty($new)) $this->mail_bo->reopen($new); } - else - { - $error = lang("Error on creating folder %1 has occured!". - " Because selected account is not active. Please ". - "click on the account first, then try again.", $new); - } + $response = Api\Json\Response::get(); if ($created===true && $error =='') {