Changeset View
Changeset View
Standalone View
Standalone View
lib/Autodiscover.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | public static function run() | ||||
// Detect request type | // Detect request type | ||||
foreach ($uris as $uri) { | foreach ($uris as $uri) { | ||||
// Outlook/Activesync | // Outlook/Activesync | ||||
if (stripos($uri, 'autodiscover.xml') !== false) { | if (stripos($uri, 'autodiscover.xml') !== false) { | ||||
$type = 'Microsoft'; | $type = 'Microsoft'; | ||||
break; | break; | ||||
} | } | ||||
// Microsoft Autodiscover V2 | |||||
elseif (stripos($uri, 'autodiscover.json') !== false) { | |||||
$type = 'Json'; | |||||
break; | |||||
} | |||||
// Mozilla Thunderbird (Kmail/Kontact/Evolution) | // Mozilla Thunderbird (Kmail/Kontact/Evolution) | ||||
else if (strpos($uri, 'config-v1.1.xml') !== false) { | else if (strpos($uri, 'config-v1.1.xml') !== false) { | ||||
$type = 'Mozilla'; | $type = 'Mozilla'; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (!$type) { | if (!$type) { | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |