diff --git a/build/configs/nginx.domain.example.conf b/build/configs/nginx.domain.example.conf new file mode 100644 index 000000000..9b6b4333c --- /dev/null +++ b/build/configs/nginx.domain.example.conf @@ -0,0 +1,65 @@ + +server { + listen 80; + server_name domain.com; + + root /var/www/domain.com; + index index.php index.html; + + log_not_found off; + charset utf-8; + + error_log /var/log/nginx/domain.com-error.log; + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + location ~ /\.ht { deny all; } + + location ^~ /data { + deny all; + return 404; + } + + rewrite ^/.well-known/carddav /index.php/dav/ redirect; + + location ~ ^(.+\.php)(.*)$ { + include fastcgi_params; + fastcgi_split_path_info ^(.+\.php)(/[^?]*).*$; + fastcgi_pass 127.0.0.1:9000; +# fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } +} + +# optional +server { + listen 80; + server_name dav.domain.com; + + rewrite ^/.well-known/carddav / redirect; + + root /var/www/domain.com; + index index.php index.html; + + log_not_found off; + charset utf-8; + + error_log /var/log/nginx/dav.domain.com-error.log; + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + location ~ /\.ht { deny all; } + + rewrite ^/.well-known/carddav / redirect; + rewrite ^(.*)$ /index.php/dav$1 last; + + location ~ ^(.+\.php)(.*)$ { + include fastcgi_params; + fastcgi_split_path_info ^(.+\.php)(/[^?]*).*$; + fastcgi_pass 127.0.0.1:9000; +# fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } +} \ No newline at end of file diff --git a/dev/ViewModels/PopupsContactsViewModel.js b/dev/ViewModels/PopupsContactsViewModel.js index 9e8f0b12f..83192b30d 100644 --- a/dev/ViewModels/PopupsContactsViewModel.js +++ b/dev/ViewModels/PopupsContactsViewModel.js @@ -559,10 +559,18 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom) $window.on('keydown', function (oEvent) { var bResult = true; - if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility()) + if (oEvent && self.modalVisibility()) { - kn.delegateRun(self, 'closeCommand'); - bResult = false; + if (Enums.EventKeyCode.Esc === oEvent.keyCode) + { + kn.delegateRun(self, 'closeCommand'); + bResult = false; + } + else if (oEvent.ctrlKey && Enums.EventKeyCode.S === oEvent.keyCode) + { + self.saveCommand(); + bResult = false; + } } return bResult; diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Base/Http.php b/rainloop/v/0.0.0/app/libraries/MailSo/Base/Http.php index c2fca5b5e..9ffbd0b1b 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Base/Http.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Base/Http.php @@ -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(); - } } diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index a3cf0a228..d33ce3991 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -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'); diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 753471af2..9d57b44d1 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -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), diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php index 91295bb73..adddc0b1f 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php @@ -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(); } diff --git a/rainloop/v/0.0.0/app/templates/Views/SettingsGeneral.html b/rainloop/v/0.0.0/app/templates/Views/SettingsGeneral.html index 409a60b96..3f9233d26 100644 --- a/rainloop/v/0.0.0/app/templates/Views/SettingsGeneral.html +++ b/rainloop/v/0.0.0/app/templates/Views/SettingsGeneral.html @@ -63,7 +63,12 @@ -
+
+
+
+ +
+