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:
Joshua Judson Rosen 2014-11-29 00:30:11 -05:00 committed by Mikael Nordfeldth
parent d671b7b289
commit 69fec16de2
1 changed files with 1 additions and 0 deletions

View File

@ -1261,6 +1261,7 @@ function common_path($relative, $ssl=false, $addSession=true)
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
if (($ssl && (common_config('site', 'ssl') === 'sometimes'))
|| StatusNet::isHTTPS()
|| common_config('site', 'ssl') === 'always') {
$proto = 'https';
if (is_string(common_config('site', 'sslserver')) &&