harden folder-prefs of user defined accounts, against losing folder-pref settings accidentaly by misconfiguration of the imap account given

This commit is contained in:
Klaus Leithoff 2011-11-04 09:22:50 +00:00
parent fb650945b4
commit e7c97e7308

View File

@ -396,11 +396,11 @@ require_once(EGW_INCLUDE_ROOT.'/felamimail/inc/class.felamimail_bosignatures.inc
$this->t->set_var('accountID','new');
}
$trashOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use Trash")),($accountData['active'] ? $folderList :array($icServer->trashfolder => $icServer->trashfolder)));
$sentOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use Sent")),($accountData['active'] ? $folderList :array($icServer->sentfolder => $icServer->sentfolder)));
$draftOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use draft folder")),($accountData['active'] ? $folderList :array($icServer->draftfolder => $icServer->draftfolder)));
$templateOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use template folder")),($accountData['active'] ? $folderList :array($icServer->templatefolder => $icServer->templatefolder)));
$tomerge = ($accountData['active'] ? $folderList :$icServer->folderstoshowinhome);
$trashOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use Trash")),($accountData['active'] && !empty($folderList) ? $folderList :array($icServer->trashfolder => $icServer->trashfolder)));
$sentOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use Sent")),($accountData['active'] && !empty($folderList) ? $folderList :array($icServer->sentfolder => $icServer->sentfolder)));
$draftOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use draft folder")),($accountData['active'] && !empty($folderList) ? $folderList :array($icServer->draftfolder => $icServer->draftfolder)));
$templateOptions = array_merge(array('' => lang('default').' '.lang("folder settings"), 'none' => lang("Don't use template folder")),($accountData['active'] && !empty($folderList) ? $folderList :array($icServer->templatefolder => $icServer->templatefolder)));
$tomerge = ($accountData['active'] && !empty($folderList) ? $folderList :$icServer->folderstoshowinhome);
$folderList = array_merge( array('' => lang('default').' '.lang("folder settings")),(is_array($tomerge)?$tomerge:array()));
$this->t->set_var('allowAccounts',($preferences->userDefinedAccounts ? 1 : 0));