diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 67fb29c75..8494f17be 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -736,18 +736,6 @@ EOF $sApplicationBanner .= '
'; } - $sEnvironment = utils::GetCurrentEnvironment(); - $sBackButton = utils::GetEnvironmentBackButton(); - if($sEnvironment != 'production') - { - $sEnvLabel = trim(MetaModel::GetConfig()->Get('app_env_label')); - if (strlen($sEnvLabel) == 0) - { - $sEnvLabel = $sEnvironment; - } - $sApplicationBanner .= ''; - } - $sApplicationBanner .= $sBannerExtraHtml; if (!empty($sNorthPane)) diff --git a/application/utils.inc.php b/application/utils.inc.php index 948930cd6..b38a1359c 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -765,29 +765,6 @@ class utils } } - /** - * Get the "Back" button to go out of the current environment - */ - public static function GetEnvironmentBackButton() - { - if (isset($_SESSION['itop_return_env'])) - { - if (isset($_SESSION['itop_return_url'])) - { - $sReturnUrl = $_SESSION['itop_return_url']; - } - else - { - $sReturnUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?switch_env='.$_SESSION['itop_return_env']; - } - return ' '; - } - else - { - return ''; - } - } - /** * Get the "Back" button to go out of the current environment */ @@ -849,12 +826,13 @@ class utils * * @return string ... */ - static public function GetAbsoluteUrlModulePage($sModule, $sPage, $aArguments = array()) + static public function GetAbsoluteUrlModulePage($sModule, $sPage, $aArguments = array(), $sEnvironment = null) { + $sEnvironment = is_null($sEnvironment) ? self::GetCurrentEnvironment() : $sEnvironment; $aArgs = array(); $aArgs[] = 'exec_module='.$sModule; $aArgs[] = 'exec_page='.$sPage; - $aArgs[] = 'exec_env='.self::GetCurrentEnvironment(); + $aArgs[] = 'exec_env='.$sEnvironment; foreach($aArguments as $sName => $sValue) { if (($sName == 'exec_module')||($sName == 'exec_page')||($sName == 'exec_env'))