Merge pull request #173 from altima/master

added Windows Phone authentication to cal and card php file
Thanks @altima

Former-commit-id: 147e68953d
This commit is contained in:
Jérôme Schneider 2014-02-02 03:28:13 -08:00
commit 1e0e59719f
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ if(!defined("BAIKAL_CAL_ENABLED") || BAIKAL_CAL_ENABLED !== TRUE) {
}
# Backends
if( BAIKAL_DAV_AUTH_TYPE == "Basic" )
if( BAIKAL_DAV_AUTH_TYPE == "Basic" || preg_match('/Windows-Phone-WebDAV-Client/i', $_SERVER['HTTP_USER_AGENT']) )
$authBackend = new \Baikal\Core\PDOBasicAuth($GLOBALS["DB"]->getPDO(), BAIKAL_AUTH_REALM);
else
$authBackend = new \Sabre\DAV\Auth\Backend\PDO($GLOBALS["DB"]->getPDO());

View file

@ -52,7 +52,7 @@ if(!defined("BAIKAL_CARD_ENABLED") || BAIKAL_CARD_ENABLED !== TRUE) {
}
# Backends
if( BAIKAL_DAV_AUTH_TYPE == "Basic" )
if( BAIKAL_DAV_AUTH_TYPE == "Basic" || preg_match('/Windows-Phone-WebDAV-Client/i', $_SERVER['HTTP_USER_AGENT']) )
$authBackend = new \Baikal\Core\PDOBasicAuth($GLOBALS["DB"]->getPDO(), BAIKAL_AUTH_REALM);
else
$authBackend = new \Sabre\DAV\Auth\Backend\PDO($GLOBALS["DB"]->getPDO());