mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Add sync_dav_domain configuration for custom dav domain
This commit is contained in:
parent
fde3e8241e
commit
bc6c320ecb
3 changed files with 40 additions and 15 deletions
|
|
@ -949,7 +949,19 @@ class Actions
|
||||||
|
|
||||||
if ($aResult['ContactsSyncIsAllowed'])
|
if ($aResult['ContactsSyncIsAllowed'])
|
||||||
{
|
{
|
||||||
$aResult['ContactsSyncServer'] = $this->Http()->GetHost(false, true, true);
|
$sDavDomain = (string) $oConfig->Get('labs', 'sync_dav_domain', '');
|
||||||
|
if (empty($sDavDomain))
|
||||||
|
{
|
||||||
|
$aResult['ContactsSyncServer'] = $this->Http()->GetHost(false, true, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sDavDomain = \rtrim($sDavDomain, '/\\ ');
|
||||||
|
$sDavDomainWithoutScheme = \preg_replace('/https?:\/\//i', '', \trim($sDavDomain));
|
||||||
|
|
||||||
|
$aResult['ContactsSyncServer'] = $sDavDomainWithoutScheme;
|
||||||
|
}
|
||||||
|
|
||||||
$aResult['ContactsSyncUser'] = $oAccount->ParentEmailHelper();
|
$aResult['ContactsSyncUser'] = $oAccount->ParentEmailHelper();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -961,10 +973,22 @@ class Actions
|
||||||
$this->Logger()->WriteException($oException);
|
$this->Logger()->WriteException($oException);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sUrl = \rtrim(\trim($this->Http()->GetScheme().'://'.$this->Http()->GetHost(true, false).$this->Http()->GetPath()), '/\\');
|
if (empty($sDavDomain))
|
||||||
$sUrl = \preg_replace('/index\.php(.*)$/i', '', $sUrl);
|
{
|
||||||
|
$sUrl = \rtrim(\trim($this->Http()->GetScheme().'://'.$this->Http()->GetHost(true, false).$this->Http()->GetPath()), '/\\');
|
||||||
$aResult['ContactsSyncPabUrl'] = $sUrl.'/index.php/dav/addressbooks/'.$oAccount->ParentEmailHelper().'/default/';
|
$sUrl = \preg_replace('/index\.php(.*)$/i', '', $sUrl);
|
||||||
|
|
||||||
|
$aResult['ContactsSyncPabUrl'] = $sUrl.'/index.php/dav';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$aResult['ContactsSyncPabUrl'] = \preg_match('/^https?:\/\//i', $sDavDomain) ? $sDavDomain : 'http://'.$sDavDomain;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($aResult['ContactsSyncPabUrl']))
|
||||||
|
{
|
||||||
|
$aResult['ContactsSyncPabUrl'] .= '/addressbooks/'.$oAccount->ParentEmailHelper().'/default/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||||
|
|
@ -4196,7 +4220,7 @@ class Actions
|
||||||
{
|
{
|
||||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||||
|
|
||||||
$this->PersonalAddressBookProvider($oAccount)->IncFrec($oAccount, \array_values($aArrayToFrec),
|
$this->PersonalAddressBookProvider($oAccount)->IncFrec($oAccount->ParentEmailHelper(), \array_values($aArrayToFrec),
|
||||||
!!$oSettings->GetConf('ContactsAutosave', false));
|
!!$oSettings->GetConf('ContactsAutosave', false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ Enables caching in the system'),
|
||||||
'Experimental settings. Handle with care.
|
'Experimental settings. Handle with care.
|
||||||
'),
|
'),
|
||||||
'sync_dav_digest_auth' => array(false),
|
'sync_dav_digest_auth' => array(false),
|
||||||
|
'sync_dav_domain' => array(''),
|
||||||
'sync_use_dav_browser' => array(true),
|
'sync_use_dav_browser' => array(true),
|
||||||
'allow_message_append' => array(false),
|
'allow_message_append' => array(false),
|
||||||
'date_from_headers' => array(false),
|
'date_from_headers' => array(false),
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
|
|
@ -1142,7 +1142,7 @@ table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
@ -1474,7 +1474,7 @@ table {
|
||||||
.icon-mail:before {
|
.icon-mail:before {
|
||||||
content: "\e062";
|
content: "\e062";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** initial setup **/
|
/** initial setup **/
|
||||||
.nano {
|
.nano {
|
||||||
/*
|
/*
|
||||||
|
|
@ -1591,7 +1591,7 @@ table {
|
||||||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Magnific Popup CSS */
|
/* Magnific Popup CSS */
|
||||||
.mfp-bg {
|
.mfp-bg {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -1956,7 +1956,7 @@ img.mfp-img {
|
||||||
right: 0;
|
right: 0;
|
||||||
padding-top: 0; }
|
padding-top: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* overlay at start */
|
/* overlay at start */
|
||||||
.mfp-fade.mfp-bg {
|
.mfp-fade.mfp-bg {
|
||||||
|
|
@ -2002,7 +2002,7 @@ img.mfp-img {
|
||||||
-moz-transform: translateX(50px);
|
-moz-transform: translateX(50px);
|
||||||
transform: translateX(50px);
|
transform: translateX(50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple-pace {
|
.simple-pace {
|
||||||
-webkit-pointer-events: none;
|
-webkit-pointer-events: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
@ -2073,7 +2073,7 @@ img.mfp-img {
|
||||||
@keyframes simple-pace-stripe-animation {
|
@keyframes simple-pace-stripe-animation {
|
||||||
0% { transform: none; transform: none; }
|
0% { transform: none; transform: none; }
|
||||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||||
}
|
}
|
||||||
.inputosaurus-container {
|
.inputosaurus-container {
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
border:1px solid #bcbec0;
|
border:1px solid #bcbec0;
|
||||||
|
|
@ -2141,7 +2141,7 @@ img.mfp-img {
|
||||||
box-shadow:none;
|
box-shadow:none;
|
||||||
}
|
}
|
||||||
.inputosaurus-input-hidden { display:none; }
|
.inputosaurus-input-hidden { display:none; }
|
||||||
|
|
||||||
.flag-wrapper {
|
.flag-wrapper {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
@ -2182,7 +2182,7 @@ img.mfp-img {
|
||||||
.flag.flag-pt-br {background-position: -192px -11px}
|
.flag.flag-pt-br {background-position: -192px -11px}
|
||||||
|
|
||||||
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
.clearfix {
|
.clearfix {
|
||||||
*zoom: 1;
|
*zoom: 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue