kopia lustrzana https://github.com/nextcloud/social
fix url generation on local host
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/741/head
rodzic
bbc89060d0
commit
10e07ce1cb
|
@ -342,6 +342,10 @@ class ConfigService {
|
||||||
* @param string $cloudAddress
|
* @param string $cloudAddress
|
||||||
*/
|
*/
|
||||||
public function setCloudUrl(string $cloudAddress) {
|
public function setCloudUrl(string $cloudAddress) {
|
||||||
|
if (parse_url($cloudAddress, PHP_URL_SCHEME) === null) {
|
||||||
|
$cloudAddress = 'http://' . $cloudAddress;
|
||||||
|
}
|
||||||
|
|
||||||
$this->setAppValue(self::CLOUD_URL, $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);
|
$this->setAppValue(self::SOCIAL_URL, $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue