s/isHTTPS/useHTTPS/ for HTTPS URL generation
This commit is contained in:
parent
eaa394ed7d
commit
dcf29c2a07
@ -199,16 +199,14 @@ class Plugin
|
|||||||
|
|
||||||
static function staticPath($plugin, $relative)
|
static function staticPath($plugin, $relative)
|
||||||
{
|
{
|
||||||
$isHTTPS = GNUsocial::isHTTPS();
|
if (GNUsocial::useHTTPS()) {
|
||||||
|
|
||||||
if ($isHTTPS) {
|
|
||||||
$server = common_config('plugins', 'sslserver');
|
$server = common_config('plugins', 'sslserver');
|
||||||
} else {
|
} else {
|
||||||
$server = common_config('plugins', 'server');
|
$server = common_config('plugins', 'server');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($server)) {
|
if (empty($server)) {
|
||||||
if ($isHTTPS) {
|
if (GNUsocial::useHTTPS()) {
|
||||||
$server = common_config('site', 'sslserver');
|
$server = common_config('site', 'sslserver');
|
||||||
}
|
}
|
||||||
if (empty($server)) {
|
if (empty($server)) {
|
||||||
@ -216,7 +214,7 @@ class Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isHTTPS) {
|
if (GNUsocial::useHTTPS()) {
|
||||||
$path = common_config('plugins', 'sslpath');
|
$path = common_config('plugins', 'sslpath');
|
||||||
} else {
|
} else {
|
||||||
$path = common_config('plugins', 'path');
|
$path = common_config('plugins', 'path');
|
||||||
@ -239,7 +237,7 @@ class Plugin
|
|||||||
$path = '/'.$path;
|
$path = '/'.$path;
|
||||||
}
|
}
|
||||||
|
|
||||||
$protocol = ($isHTTPS) ? 'https' : 'http';
|
$protocol = GNUsocial::useHTTPS() ? 'https' : 'http';
|
||||||
|
|
||||||
return $protocol.'://'.$server.$path.$plugin.'/'.$relative;
|
return $protocol.'://'.$server.$path.$plugin.'/'.$relative;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user