|
@@ -768,29 +768,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 ' <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
|
|
|
- */
|
|
|
public static function GetPopupMenuItems($oPage, $iMenuId, $param, &$aActions)
|
|
|
{
|
|
|
foreach (MetaModel::EnumPlugins('iPopupMenuExtension') as $oExtensionInstance)
|
|
@@ -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'))
|