diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 17:15:58 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-13 17:15:58 +0200 |
commit | ab5149f5df332a41f88973ecdc0a9b7ba24a5423 (patch) | |
tree | a5e71ae6dc76ba0c4d2ecccd49a2045499fa4eee /apps/files_external/lib | |
parent | 4b9465b937a7754d2b58a77cf8f12adeaccef993 (diff) | |
download | nextcloud-server-ab5149f5df332a41f88973ecdc0a9b7ba24a5423.tar.gz nextcloud-server-ab5149f5df332a41f88973ecdc0a9b7ba24a5423.zip |
Allow specifying protocol in ext storage OC config
Allow specifying a protocol in the host field when mounting another
ownCloud instance. Note that this was already possible with the WebDAV
config but this bug made it inconsistent.
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/owncloud.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/owncloud.php b/apps/files_external/lib/owncloud.php index 98314102a64..04a1e959eb0 100644 --- a/apps/files_external/lib/owncloud.php +++ b/apps/files_external/lib/owncloud.php @@ -22,6 +22,14 @@ class OwnCloud extends \OC\Files\Storage\DAV{ // extract context path from host if specified // (owncloud install path on host) $host = $params['host']; + // strip protocol + if (substr($host, 0, 8) == "https://") { + $host = substr($host, 8); + $params['secure'] = true; + } else if (substr($host, 0, 7) == "http://") { + $host = substr($host, 7); + $params['secure'] = false; + } $contextPath = ''; $hostSlashPos = strpos($host, '/'); if ($hostSlashPos !== false){ |