Adds better remote repository management for the super power features. Fixes #1014 so that powers are added to components.
This commit is contained in:
@@ -85,6 +85,16 @@ abstract class Api
|
||||
$this->http->setToken($token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the API url
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function api()
|
||||
{
|
||||
return $this->uri->api();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -58,7 +58,7 @@ class Jcb implements ServiceProviderInterface
|
||||
$gitea_url = Helper::getParams('com_componentbuilder')->get('custom_gitea_url');
|
||||
|
||||
// only load this if we have a custom URL set
|
||||
if ($add_gitea_url == 2 && is_string($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
if ($add_gitea_url == 2 && !empty($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
{
|
||||
return new Uri($gitea_url);
|
||||
}
|
||||
|
@@ -72,7 +72,6 @@ final class Http extends JoomlaHttp
|
||||
$headers['Authorization'] = 'token ' . $token;
|
||||
|
||||
$this->setOption('headers', $headers);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -134,7 +134,6 @@ final class Uri
|
||||
private function setVersion($version)
|
||||
{
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user