From 3ba9a1044e35a1b734daa8a4fd785461394e85bf Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 18 Jun 2003 16:26:34 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20diff=E9rente=20du=20DOL=5FURL=5FROOT?= =?UTF-8?q?=20pour=20g=E9rer=20le=20https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/main.inc.php3 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php3 b/htdocs/main.inc.php3 index 890e4358931..db0c77850d9 100644 --- a/htdocs/main.inc.php3 +++ b/htdocs/main.inc.php3 @@ -26,9 +26,20 @@ if (! include ("conf/conf.php")) exit ; } - 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"); /* @@ -243,7 +254,7 @@ function top_menu($head) // print ""; print $head; // print ''; - print ''; + print ''; print "\n"; if (defined("MAIN_TITLE")) {