mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N890.3 Archive mode toggle menu not visible after setup/MTP: the information is cached into the session and needs to be reset
SVN:trunk[4870]
This commit is contained in:
@@ -155,7 +155,10 @@ class utils
|
||||
}
|
||||
// Read and record the value for switching the archive mode
|
||||
$iCurrent = self::ReadParam('with-archive', $iDefault);
|
||||
$_SESSION['archive_mode'] = $iCurrent;
|
||||
if (isset($_SESSION))
|
||||
{
|
||||
$_SESSION['archive_mode'] = $iCurrent;
|
||||
}
|
||||
// Read and use the value for the current page (web services)
|
||||
$iCurrent = self::ReadParam('with_archive', $iCurrent, true);
|
||||
self::$bPageMode = ($iCurrent == 1);
|
||||
|
||||
@@ -5261,20 +5261,26 @@ abstract class MetaModel
|
||||
|
||||
public static function ResetCache($sEnvironmentId = null)
|
||||
{
|
||||
if (!function_exists('apc_delete')) return;
|
||||
if (is_null($sEnvironmentId))
|
||||
{
|
||||
$sEnvironmentId = MetaModel::GetEnvironmentId();
|
||||
}
|
||||
|
||||
$sAppIdentity = 'itop-'.$sEnvironmentId;
|
||||
require_once(APPROOT.'/core/dict.class.inc.php');
|
||||
Dict::ResetCache($sAppIdentity);
|
||||
|
||||
foreach(self::GetCacheEntries($sEnvironmentId) as $sKey => $aAPCInfo)
|
||||
if (function_exists('apc_delete'))
|
||||
{
|
||||
$sAPCKey = $aAPCInfo['info'];
|
||||
apc_delete($sAPCKey);
|
||||
foreach (self::GetCacheEntries($sEnvironmentId) as $sKey => $aAPCInfo)
|
||||
{
|
||||
$sAPCKey = $aAPCInfo['info'];
|
||||
apc_delete($sAPCKey);
|
||||
}
|
||||
}
|
||||
|
||||
require_once(APPROOT.'core/userrights.class.inc.php');
|
||||
UserRights::FlushPrivileges();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1152,8 +1152,16 @@ class UserRights
|
||||
self::$m_aAdmins = array();
|
||||
self::$m_aPortalUsers = array();
|
||||
}
|
||||
if (!isset($_SESSION))
|
||||
{
|
||||
session_name('itop-'.md5(APPROOT));
|
||||
session_start();
|
||||
}
|
||||
self::_ResetSessionCache();
|
||||
return self::$m_oAddOn->FlushPrivileges();
|
||||
if (self::$m_oAddOn)
|
||||
{
|
||||
self::$m_oAddOn->FlushPrivileges();
|
||||
}
|
||||
}
|
||||
|
||||
static $m_aCacheUsers;
|
||||
|
||||
@@ -505,7 +505,6 @@ class RunTimeEnvironment
|
||||
SetupUtils::builddir($sCacheDir);
|
||||
SetupUtils::tidydir($sCacheDir);
|
||||
|
||||
require_once(APPROOT.'/core/dict.class.inc.php');
|
||||
MetaModel::ResetCache(md5(APPROOT).'-'.$this->sTargetEnv);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user