Fixing #228
This commit is contained in:
parent
edbd83585c
commit
e51e337fff
1 changed files with 12 additions and 4 deletions
|
@ -55,10 +55,18 @@ if(!defined("BAIKAL_CAL_ENABLED") || BAIKAL_CAL_ENABLED !== TRUE) {
|
|||
}
|
||||
|
||||
# Backends
|
||||
if( BAIKAL_DAV_AUTH_TYPE == "Basic" || (array_key_exists('HTTP_USER_AGENT', $_SERVER) && preg_match('/Windows-Phone-WebDAV-Client/i', $_SERVER['HTTP_USER_AGENT'])) )
|
||||
if(
|
||||
BAIKAL_DAV_AUTH_TYPE == "Basic" || (
|
||||
array_key_exists('HTTP_USER_AGENT', $_SERVER) && (
|
||||
preg_match('/Windows-Phone-WebDAV-Client/i', $_SERVER['HTTP_USER_AGENT']) ||
|
||||
preg_match('/MSFT-WP\/8.10.*/i', $_SERVER['HTTP_USER_AGENT'])
|
||||
)
|
||||
)
|
||||
) {
|
||||
$authBackend = new \Baikal\Core\PDOBasicAuth($GLOBALS["DB"]->getPDO(), BAIKAL_AUTH_REALM);
|
||||
else
|
||||
} else {
|
||||
$authBackend = new \Sabre\DAV\Auth\Backend\PDO($GLOBALS["DB"]->getPDO());
|
||||
}
|
||||
|
||||
$principalBackend = new \Sabre\DAVACL\PrincipalBackend\PDO($GLOBALS["DB"]->getPDO());
|
||||
$calendarBackend = new \Sabre\CalDAV\Backend\PDO($GLOBALS["DB"]->getPDO());
|
||||
|
|
Loading…
Reference in a new issue