mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
CardDAV (beta/unstable)
This commit is contained in:
parent
248aab17c2
commit
fb54efe922
25 changed files with 133 additions and 26 deletions
|
|
@ -573,7 +573,7 @@ class Http
|
|||
*/
|
||||
public function GetUrl()
|
||||
{
|
||||
return '/'.$this->GetServer('REQUEST_URI', '');
|
||||
return $this->GetServer('REQUEST_URI', '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -583,12 +583,4 @@ class Http
|
|||
{
|
||||
return $this->GetScheme().'://'.$this->GetHost(true, false).$this->GetPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetFullUrlWithQuery()
|
||||
{
|
||||
return $this->GetScheme().'://'.$this->GetHost(true, false).$this->GetUrl();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1878,7 +1878,7 @@ class Actions
|
|||
|
||||
$this->setConfigFromParams($oConfig, 'ContactsEnable', 'contacts', 'enable', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsSharing', 'contacts', 'allow_sharing', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsSync', 'contacts', 'allow_carddav_sync', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsSync', 'contacts', 'allow_sync', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsPdoDsn', 'contacts', 'pdo_dsn', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsPdoUser', 'contacts', 'pdo_user', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'ContactsPdoPassword', 'contacts', 'pdo_password', 'dummy');
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ Enables caching in the system'),
|
|||
'Experimental settings. Handle with care.
|
||||
'),
|
||||
'sync_dav_digest_auth' => array(false),
|
||||
'sync_use_dav_browser' => array(true),
|
||||
'allow_message_append' => array(false),
|
||||
'date_from_headers' => array(false),
|
||||
'cache_system_data' => array(true),
|
||||
|
|
|
|||
|
|
@ -745,16 +745,30 @@ class ServiceActions
|
|||
$oPrincipalCollection, $oAddressBookRoot
|
||||
));
|
||||
|
||||
$aPath = \trim($this->oHttp->GetPath(), '/\\ ');
|
||||
$oServer->setBaseUri((0 < \strlen($aPath) ? '/'.$aPath : '').'/index.php/dav/');
|
||||
// $oServer->setBaseUri('/');
|
||||
if (false === \strpos($this->oHttp->GetUrl(), '/index.php/dav/'))
|
||||
{
|
||||
$oServer->setBaseUri('/');
|
||||
}
|
||||
else
|
||||
{
|
||||
$aPath = \trim($this->oHttp->GetPath(), '/\\ ');
|
||||
$oServer->setBaseUri((0 < \strlen($aPath) ? '/'.$aPath : '').'/index.php/dav/');
|
||||
}
|
||||
|
||||
// Plugins
|
||||
$oServer->addPlugin(new \Sabre\DAV\Auth\Plugin($oAuthBackend, 'RainLoop'));
|
||||
$oServer->addPlugin(new \Sabre\DAV\Browser\Plugin());
|
||||
$oServer->addPlugin(new \Sabre\CardDAV\Plugin());
|
||||
$oServer->addPlugin(new \Sabre\DAVACL\Plugin());
|
||||
$oServer->addPlugin(new \Sabre\CardDAV\VCFExportPlugin());
|
||||
$oServer->addPlugin(new \RainLoop\SabreDAV\Logger($this->Logger()));
|
||||
$oServer->addPlugin(new \RainLoop\SabreDAV\Logger($this->Logger()));
|
||||
|
||||
if ($this->Config()->Get('labs', 'sync_use_dav_browser', false))
|
||||
{
|
||||
$oServer->addPlugin(new \Sabre\DAV\Browser\Plugin());
|
||||
}
|
||||
|
||||
$this->Plugins()->RunHook('filter.sabre-dav-before-exec', array(&$oServer));
|
||||
|
||||
$oServer->exec();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue