CS tweaks
parent
007ca5ff6a
commit
11f1e03739
|
@ -195,12 +195,14 @@ class RemoteFilesystem
|
||||||
$originUrl = 'github.com';
|
$originUrl = 'github.com';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gitlab can be installed in a non-root context. When downloading archives the originalUrl is the host without
|
// Gitlab can be installed in a non-root context (i.e. gitlab.com/foo). When downloading archives the originUrl
|
||||||
// the relative path, so we look for the registered gitlab-domains that matching the host here
|
// is the host without the path, so we look for the registered gitlab-domains matching the host here
|
||||||
if (is_array($this->config->get('gitlab-domains'))
|
if (
|
||||||
|
is_array($this->config->get('gitlab-domains'))
|
||||||
&& false === strpos($originUrl, '/')
|
&& false === strpos($originUrl, '/')
|
||||||
&& !in_array($originUrl, $this->config->get('gitlab-domains'))) {
|
&& !in_array($originUrl, $this->config->get('gitlab-domains'))
|
||||||
foreach($this->config->get('gitlab-domains') as $gitlabDomain) {
|
) {
|
||||||
|
foreach ($this->config->get('gitlab-domains') as $gitlabDomain) {
|
||||||
if (0 === strpos($gitlabDomain, $originUrl)) {
|
if (0 === strpos($gitlabDomain, $originUrl)) {
|
||||||
$originUrl = $gitlabDomain;
|
$originUrl = $gitlabDomain;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue