make sure we are talking to the correct server when importing messages ; this is a merge of 52305 WITHOUT the call of emailadmin_imapbase::getAttachmentAccount, as it is not backported yet. BEWARE the mere explode of the rowID may fail to determine the correct mail-account-id. use self::splitRowID instead

This commit is contained in:
Klaus Leithoff 2015-03-27 14:58:47 +00:00
parent 7532580ddf
commit 7d76f0bd92

View File

@ -3226,7 +3226,14 @@ class mail_ui
$file = $content['uploadForImport']; $file = $content['uploadForImport'];
} }
$destination = $content['FOLDER'][0]; $destination = $content['FOLDER'][0];
if (stripos($destination,self::$delimiter)!==false) list($serverId,$destination) = explode(self::$delimiter,$destination,2); $rememberServerID = $icServerID = $this->mail_bo->profileID;
if (stripos($destination,self::$delimiter)!==false) list($icServerID,$destination) = explode(self::$delimiter,$destination,2);
if ($icServerID && $icServerID != $this->mail_bo->profileID)
{
//error_log(__METHOD__.__LINE__.' change Profile to ->'.$icServerID);
$this->changeProfile($icServerID);
}
//error_log(__METHOD__.__LINE__.self::$delimiter.array2string($destination)); //error_log(__METHOD__.__LINE__.self::$delimiter.array2string($destination));
$importID = mail_bo::getRandomString(); $importID = mail_bo::getRandomString();
$importFailed = false; $importFailed = false;