<?php

use TYPO3\CMS\Core\Core\Environment;

$currentApplicationContext = (string)Environment::getContext();

$contextConfigFile = Environment::getPublicPath() . '/../config/system/additional.' . strtolower(str_replace('/', '.', $currentApplicationContext)) . '.php';

if (file_exists($contextConfigFile)) {
    require($contextConfigFile);
}

$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] .= ' [' . strtoupper($currentApplicationContext) . ']';
