common_path(): use HTTPS if current URL is HTTPS
Bring common_path() back into harmony with common_local_url(), which started doing this 2013-03-25. Shouldn't need to spread "StatusNet::isHTTPS()" logic all over wherever common_path() is called; just DTRT automatically instead.
This commit is contained in:
parent
d671b7b289
commit
69fec16de2
@ -1261,6 +1261,7 @@ function common_path($relative, $ssl=false, $addSession=true)
|
|||||||
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
|
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
|
||||||
|
|
||||||
if (($ssl && (common_config('site', 'ssl') === 'sometimes'))
|
if (($ssl && (common_config('site', 'ssl') === 'sometimes'))
|
||||||
|
|| StatusNet::isHTTPS()
|
||||||
|| common_config('site', 'ssl') === 'always') {
|
|| common_config('site', 'ssl') === 'always') {
|
||||||
$proto = 'https';
|
$proto = 'https';
|
||||||
if (is_string(common_config('site', 'sslserver')) &&
|
if (is_string(common_config('site', 'sslserver')) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user