fix bug regarding Certificate Check (if you wanted it switched of, all applicable emailadmin profiles had to switch it off); fix bug regarding missing but assumed existing default profile resulted in wrong LoginType method choosen

This commit is contained in:
Klaus Leithoff 2013-06-14 10:57:08 +00:00
parent 96b744df72
commit 094e6d8c32
2 changed files with 11 additions and 1 deletions

View File

@ -593,6 +593,8 @@ class emailadmin_bo extends so_sql
// restore the default loginType and check if there are forced/predefined user access Data ($imapAuthType may be set to admin)
//error_log(__METHOD__.__LINE__.' ServerID:'.$icServer->ImapServerId.' Logintype:'.array2string($data['imapLoginType']));
list($data['imapLoginType'],$imapAuthType) = explode('#',$data['imapLoginType'],2);
if (empty($data['imapLoginType'])) $data['imapLoginType'] = 'standard';
if (empty($imapAuthType)) $imapAuthType = $data['imapLoginType'];
//error_log(__METHOD__.__LINE__.' ServerID:'.$icServer->ImapServerId.' Logintype:'.array2string($data['imapLoginType']).' AuthType:'.$imapAuthType);
$icServer->loginType = $data['imapLoginType'];
$icServer->domainName = $data['defaultDomain'];

View File

@ -242,7 +242,7 @@
// take the first value found by explode, which is assumed the default value
list($mergeInTo[$key],$rest) = explode('#',$mergeInTo[$key],2);
$mergeInTo[$key] = $mergeInTo[$key].'#'.$toMerge[$key];
#error_log($mergeInTo[$key]);
//error_log($mergeInTo[$key]);
break;
}
case 'imapServer':
@ -250,6 +250,14 @@
case 'imapPort':
case 'imapTLSEncryption':
case 'imapTLSAuthentication':
// whatever it is, if the server is set and the imapTLSAuthentication option is checked,
// then the user wanted that (checked results in a value "no")
if (strlen($toMerge['imapServer'])>0 && $toMerge[$key]=='no')
{
//error_log(__METHOD__.__LINE__." $key $mergeInTo[$key] = $toMerge[$key]");
$mergeInTo[$key]=$toMerge[$key];
break;
}
case 'imapEnableCyrusAdmin':
case 'imapAdminUsername':
case 'imapAdminPW':