diff --git a/htdocs/public/webportal/css/themes/custom.css.php b/htdocs/public/webportal/css/themes/custom.css.php index bdb1de8d7bb..d1d20c474d8 100644 --- a/htdocs/public/webportal/css/themes/custom.css.php +++ b/htdocs/public/webportal/css/themes/custom.css.php @@ -45,6 +45,9 @@ if (!defined('NOREQUIREAJAX')) { session_cache_limiter('public'); +if (!defined('MAIN_INC_REL_DIR')) { + define('MAIN_INC_REL_DIR', '../../'); +} require_once __DIR__.'/../../webportal.main.inc.php'; dol_include_once('/webportal/class/webPortalTheme.class.php'); diff --git a/htdocs/public/webportal/webportal.main.inc.php b/htdocs/public/webportal/webportal.main.inc.php index 3fbe5b3d825..cbf21f95219 100644 --- a/htdocs/public/webportal/webportal.main.inc.php +++ b/htdocs/public/webportal/webportal.main.inc.php @@ -76,8 +76,11 @@ if (!function_exists('dol_getprefix')) { } } - -include '../../main.inc.php'; +$relDir = ''; +if (defined('MAIN_INC_REL_DIR')) { + $relDir = MAIN_INC_REL_DIR; +} +include $relDir.'../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT . '/societe/class/societeaccount.class.php';