Management of environments: the banner must be injected by the mean of iPageUIExtension

SVN:trunk[2844]
This commit is contained in:
Romain Quetiez
2013-09-02 12:54:00 +00:00
parent afa6399dce
commit ca1d4d8936
2 changed files with 3 additions and 37 deletions

View File

@@ -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 '&nbsp;<button onclick="window;location.href=\''.addslashes($sReturnUrl).'\'">'.Dict::S('UI:Button:Back').'</button>';
}
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'))