[Web] Better fkey handling in init_db; set body font size to 11pt instead of 14px; Changes to autodiscover functions

This commit is contained in:
andryyy
2017-10-02 15:58:55 +02:00
parent 7cb3c416cb
commit a837c9ab53
4 changed files with 31 additions and 20 deletions

View File

@@ -15,16 +15,20 @@ error_reporting(0);
$data = trim(file_get_contents("php://input"));
// Desktop client needs IMAP, unless it's Outlook 2013 or higher on Windows
if (strpos($data, 'autodiscover/outlook/responseschema') !== false) { // desktop client
$autodiscover_config['autodiscoverType'] = 'imap';
if ($autodiscover_config['useEASforOutlook'] == 'yes' &&
// Office for macOS does not support EAS
strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') === false &&
// Outlook 2013 (version 15) or higher
preg_match('/(Outlook|Office).+1[5-9]\./', $_SERVER['HTTP_USER_AGENT'])
) {
$autodiscover_config['autodiscoverType'] = 'activesync';
if ($autodiscover_config['autodiscoverType'] == 'activesync') {
if (preg_match("/Outlook/i", $_SERVER['HTTP_USER_AGENT'])) {
if ($autodiscover_config['useEASforOutlook'] == 'yes') {
preg_match("/^((?!.*Mac).)*(Outlook|Office).+1[5-9].*/i", $_SERVER['HTTP_USER_AGENT'], $supported_outlook);
if (empty($supported_outlook)) {
$autodiscover_config['autodiscoverType'] = 'imap';
}
}
else {
$autodiscover_config['autodiscoverType'] = 'imap';
}
}
if (preg_match("/emClient/i", $_SERVER['HTTP_USER_AGENT'])) {
$autodiscover_config['autodiscoverType'] = 'imap';
}
}