CardDAV (pre-alpha/unstable)

This commit is contained in:
RainLoop Team 2013-12-23 04:06:48 +04:00
parent 0ec965bccb
commit 599e934b4a
76 changed files with 6984 additions and 1512 deletions

View file

@ -100,29 +100,23 @@ class Service
$this->oActions->KeenIO('Install');
}
$bCached = false;
$sResult = '';
$sPathInfo = \trim(\trim($this->oHttp->GetServer('PATH_INFO', '')), ' /');
if (!empty($sPathInfo))
if ($this->oActions->Config()->Get('labs', 'sync_allow_dav', false))
{
if ('dav' !== \substr($sPathInfo, 0, 3))
$sDavDomain = \trim($this->oActions->Config()->Get('labs', 'sync_dav_host', ''));
if (!empty($sDavDomain) && $sDavDomain === $this->oHttp->GetHost())
{
$sPathInfo = '';
$this->oServiceActions->HostDav();
return $this;
}
}
if (empty($sPathInfo))
$bCached = false;
$sResult = '';
$sQuery = \trim(\trim($this->oHttp->GetServer('QUERY_STRING', '')), ' /');
$iPos = \strpos($sQuery, '&');
if (0 < $iPos)
{
$sQuery = \trim(\trim($this->oHttp->GetServer('QUERY_STRING', '')), ' /');
$iPos = \strpos($sQuery, '&');
if (0 < $iPos)
{
$sQuery = \substr($sQuery, 0, $iPos);
}
}
else
{
$sQuery = $sPathInfo;
$sQuery = \substr($sQuery, 0, $iPos);
}
$this->oActions->Plugins()->RunHook('filter.http-query', array(&$sQuery));