mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Fix CI
This commit is contained in:
@@ -1838,7 +1838,6 @@ class UserRights
|
||||
self::$m_aAdmins = array();
|
||||
self::$m_aPortalUsers = array();
|
||||
}
|
||||
Session::FlushSession();
|
||||
self::_ResetSessionCache();
|
||||
if (self::$m_oAddOn)
|
||||
{
|
||||
|
||||
@@ -49,19 +49,6 @@ class Session
|
||||
}
|
||||
}
|
||||
|
||||
public static function FlushSession()
|
||||
{
|
||||
if (self::IsModeCLI()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_null(self::$iSessionId)) {
|
||||
self::$bIsInitialized = false;
|
||||
self::$bSessionStarted = false;
|
||||
self::Start();
|
||||
}
|
||||
}
|
||||
|
||||
public static function RegenerateId($bDeleteOldSession = false)
|
||||
{
|
||||
if (self::IsModeCLI()) {
|
||||
@@ -69,6 +56,9 @@ class Session
|
||||
}
|
||||
|
||||
session_regenerate_id($bDeleteOldSession);
|
||||
if (self::$bSessionStarted) {
|
||||
self::WriteClose();
|
||||
}
|
||||
self::$bSessionStarted = session_start();
|
||||
self::$iSessionId = session_id();
|
||||
}
|
||||
|
||||
@@ -133,4 +133,12 @@ class SessionTest extends ItopTestCase
|
||||
$this->assertFalse(Session::IsSet(['test1', 'test2', 'test3']));
|
||||
}
|
||||
|
||||
public function testRegenerateId()
|
||||
{
|
||||
Session::Start();
|
||||
$iPrevSessionId = Session::$iSessionId;
|
||||
Session::RegenerateId();
|
||||
//$this->assertFalse(Session::IsSet('test'));
|
||||
$this->assertNotEquals($iPrevSessionId, Session::$iSessionId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user