From 69fec16de2c9168dc77f2808725c3ca37fa545a1 Mon Sep 17 00:00:00 2001
From: Joshua Judson Rosen <rozzin@geekspace.com>
Date: Sat, 29 Nov 2014 00:30:11 -0500
Subject: [PATCH] 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.
---
 lib/util.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/util.php b/lib/util.php
index 08a0cdea2f..e18e1991ff 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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')) &&
-- 
2.39.5