diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-09-24 13:58:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 13:58:02 +0200 |
commit | b459819e4cc94d6c51660280a7e766f180ed76cd (patch) | |
tree | fdea04ceffe1dd808ad9d8ced1e2d0e6c01a2fc3 /lib | |
parent | f247edd4e2063439d545e7b028630ce42b6f0a70 (diff) | |
parent | 10e07ce1cb3285e2c02a2e9a8bfaa7e42fab7f97 (diff) |
Merge pull request #741 from nextcloud/bugfix/727/fix-url-generation-on-local-host
fix url generation on local host
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/ConfigService.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 715ff8f5..514f73f0 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -342,6 +342,10 @@ class ConfigService { * @param string $cloudAddress */ public function setCloudUrl(string $cloudAddress) { + if (parse_url($cloudAddress, PHP_URL_SCHEME) === null) { + $cloudAddress = 'http://' . $cloudAddress; + } + $this->setAppValue(self::CLOUD_URL, $cloudAddress); } @@ -397,6 +401,10 @@ class ConfigService { ); } + if (parse_url($url, PHP_URL_SCHEME) === null) { + $url = 'http://' . $url; + } + $this->setAppValue(self::SOCIAL_URL, $url); } |