Merge pull request #21671 from owncloud/fix-setup-on-master
Use legacy method when ownCloud is not yet installed
This commit is contained in:
commit
4129480eb0
|
@ -62,7 +62,14 @@ class Client implements IClient {
|
||||||
if ($this->certificateManager->listCertificates() !== []) {
|
if ($this->certificateManager->listCertificates() !== []) {
|
||||||
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath());
|
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath());
|
||||||
} else {
|
} else {
|
||||||
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
|
// If the instance is not yet setup we need to use the static path as
|
||||||
|
// $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate
|
||||||
|
// a view
|
||||||
|
if($this->config->getSystemValue('installed', false)) {
|
||||||
|
$this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null));
|
||||||
|
} else {
|
||||||
|
$this->client->setDefaultOption('verify', \OC::$SERVERROOT . '/resources/config/ca-bundle.crt');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler');
|
$this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler');
|
||||||
|
|
Loading…
Reference in New Issue