fixing a possible problem, when saving as Draft, when not in default profile -> e.g. in some user defined account

This commit is contained in:
Klaus Leithoff 2009-10-07 14:12:40 +00:00
parent 6aee31b599
commit e851fc0b58

View File

@ -870,14 +870,14 @@
// decide where to save the message (default to draft folder, if we find nothing else) // decide where to save the message (default to draft folder, if we find nothing else)
// if the current folder is in draft or template folder save it there // if the current folder is in draft or template folder save it there
// if it is called from printview then save it with the draft folder // if it is called from printview then save it with the draft folder
$savingDestination = $this->preferencesArray['draftFolder']; $savingDestination = ($this->preferences->ic_server[0]->draftfolder ? $this->preferences->ic_server[0]->draftfolder : $this->preferencesArray['draftFolder']);
if (empty($this->sessionData['messageFolder']) && !empty($this->sessionData['mailbox'])) $this->sessionData['messageFolder'] = $this->sessionData['mailbox']; if (empty($this->sessionData['messageFolder']) && !empty($this->sessionData['mailbox'])) $this->sessionData['messageFolder'] = $this->sessionData['mailbox'];
if ($bofelamimail->isDraftFolder($this->sessionData['messageFolder']) if ($bofelamimail->isDraftFolder($this->sessionData['messageFolder'])
|| $bofelamimail->isTemplateFolder($this->sessionData['messageFolder'])) || $bofelamimail->isTemplateFolder($this->sessionData['messageFolder']))
{ {
$savingDestination = $this->sessionData['messageFolder']; $savingDestination = $this->sessionData['messageFolder'];
} }
if ( !empty($_formData['printit']) && $_formData['printit'] == 0 ) $savingDestination = $this->preferencesArray['draftFolder']; if ( !empty($_formData['printit']) && $_formData['printit'] == 0 ) $savingDestination = ($this->preferences->ic_server[0]->draftfolder ? $this->preferences->ic_server[0]->draftfolder : $this->preferencesArray['draftFolder']);
if (count($mailAddr)>0) $BCCmail = $mail->AddrAppend("Bcc",$mailAddr); if (count($mailAddr)>0) $BCCmail = $mail->AddrAppend("Bcc",$mailAddr);
$bofelamimail->openConnection(); $bofelamimail->openConnection();