Fix: use https if https is used

This commit is contained in:
Laurent Destailleur 2012-09-18 11:06:49 +02:00
parent 7167edb244
commit ffbe2acc36

View File

@ -1416,8 +1416,9 @@ class User extends CommonObject
{
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
}
if (! empty($dolibarr_main_force_https)) $urlwithouturlroot=preg_replace('/http:/i','https:',$urlwithouturlroot);
if (! empty($dolibarr_main_force_https)
|| (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on')) $urlwithouturlroot=preg_replace('/http:/i','https:',$urlwithouturlroot);
// TODO Use outputlangs to translate messages
if (! $changelater)
{