Gestion différente du DOL_URL_ROOT pour gérer le https
This commit is contained in:
parent
d9042e283e
commit
3ba9a1044e
@ -26,9 +26,20 @@ if (! include ("conf/conf.php"))
|
|||||||
exit ;
|
exit ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root);
|
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root);
|
||||||
define('DOL_URL_ROOT', $dolibarr_main_url_root);
|
|
||||||
|
/* On traitera plus tard le https */
|
||||||
|
if (strtolower(substr($dolibarr_main_url_root, 0, 7)) == 'http://')
|
||||||
|
{
|
||||||
|
$uri = substr($dolibarr_main_url_root, 7);
|
||||||
|
}
|
||||||
|
if (strtolower(substr($dolibarr_main_url_root, 0, 7)) == 'https:/')
|
||||||
|
{
|
||||||
|
$uri = substr($dolibarr_main_url_root, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pos = substr(strstr ($uri, '/'), 1);
|
||||||
|
define('DOL_URL_ROOT', $pos);
|
||||||
|
|
||||||
require (DOL_DOCUMENT_ROOT."/conf/conf.class.php3");
|
require (DOL_DOCUMENT_ROOT."/conf/conf.class.php3");
|
||||||
/*
|
/*
|
||||||
@ -243,7 +254,7 @@ function top_menu($head)
|
|||||||
// print "<HTML><HEAD>";
|
// print "<HTML><HEAD>";
|
||||||
print $head;
|
print $head;
|
||||||
// print '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">';
|
// print '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">';
|
||||||
print '<LINK REL="stylesheet" TYPE="text/css" HREF="'.DOL_URL_ROOT.'/'.$conf->css.'">';
|
print '<LINK REL="stylesheet" TYPE="text/css" HREF="/'.$conf->css.'">';
|
||||||
print "\n";
|
print "\n";
|
||||||
if (defined("MAIN_TITLE"))
|
if (defined("MAIN_TITLE"))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user