From 366d2754ef670c9dc58f20cb5fa35452551c9a10 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 5 Dec 2019 12:39:28 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02060=20-=20Fix=20regression=20making=20u?= =?UTF-8?q?rl=20pointing=20to=20the=20portal=20not=20working=20in=20notifi?= =?UTF-8?q?cation=20anymore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-portal-base/portal/config/bootstrap.php | 4 ---- datamodels/2.x/itop-portal-base/portal/public/index.php | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) 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 1c0b6bc893..896c2a0a14 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php +++ b/datamodels/2.x/itop-portal-base/portal/config/bootstrap.php @@ -147,10 +147,6 @@ if (empty($_ENV['PORTAL_ID'])) exit; } -// Stacking context tag so it knows we are in the portal -$oContext = new ContextTag('GUI:Portal'); -$oContext2 = new ContextTag('Portal:' . $_ENV['PORTAL_ID']); - // Env. vars to be used in templates and others $_ENV['COMBODO_CURRENT_ENVIRONMENT'] = utils::GetCurrentEnvironment(); $_ENV['COMBODO_ABSOLUTE_URL'] = utils::GetAbsoluteUrlAppRoot(); diff --git a/datamodels/2.x/itop-portal-base/portal/public/index.php b/datamodels/2.x/itop-portal-base/portal/public/index.php index ad2c169042..e03b7b56a0 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/index.php +++ b/datamodels/2.x/itop-portal-base/portal/public/index.php @@ -15,8 +15,6 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * - * */ use Combodo\iTop\Portal\Kernel; @@ -24,6 +22,10 @@ use Symfony\Component\HttpFoundation\Request; require_once MODULESROOT.'itop-portal-base/portal/config/bootstrap.php'; +// Stacking context tag so it knows we are in the portal +$oContext = new ContextTag('GUI:Portal'); +$oContext2 = new ContextTag('Portal:' . $_ENV['PORTAL_ID']); + // Note: Manually refactored ternary condition to be PHP 5.x compatible if ($trustedProxies = isset($_SERVER['TRUSTED_PROXIES']) ? $_SERVER['TRUSTED_PROXIES'] : (isset($_ENV['TRUSTED_PROXIES']) ? $_ENV['TRUSTED_PROXIES'] : false)) {