From e8aaec5789651f2aac5733ddfd2d58af652b0bbf Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 17 Jan 2020 17:33:52 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02060=20-=20Regression:=20Fix=20missing?= =?UTF-8?q?=20PORTAL=5FID=20constant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.x/itop-portal-base/portal/config/bootstrap.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php b/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php index 8a42b6534..fe6381bdc 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php +++ b/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php @@ -147,6 +147,13 @@ if (empty($_ENV['PORTAL_ID'])) exit; } +// Make sure that the PORTAL_ID constant is also defined +// Note: This is widely used in extensions, snippets and all +if (!defined('PORTAL_ID')) +{ + define('PORTAL_ID', $_ENV['PORTAL_ID']); +} + // Env. vars to be used in templates and others $_ENV['COMBODO_CURRENT_ENVIRONMENT'] = utils::GetCurrentEnvironment(); $_ENV['COMBODO_ABSOLUTE_URL'] = utils::GetAbsoluteUrlAppRoot();