reverting 2 changes around sessions which break our installation

checking for the not existing (new) database runs into an invinit recursion
the checks not to use $_SESSION, if no session is active was added in an attempt to get SimpleSAMLphp discovery working, but seems unneccessary for what we currently use
This commit is contained in:
Ralf Becker 2020-06-15 10:11:31 +02:00
parent 54e1a93b38
commit e996b2c0cf
2 changed files with 2 additions and 2 deletions

View File

@ -402,7 +402,7 @@ class Cache
*/
static public function &getSession($app,$location,$callback=null,array $callback_params=array(),$expiration=0)
{
if (!isset($_SESSION) || isset($_SESSION[Session::EGW_SESSION_ENCRYPTED]))
if (isset($_SESSION[Session::EGW_SESSION_ENCRYPTED]))
{
if (Session::ERROR_LOG_DEBUG) error_log(__METHOD__.' called after session was encrypted --> ignored!');
return null; // can no longer store something in the session, eg. because commit_session() was called

View File

@ -585,7 +585,7 @@ class Db
{
foreach(get_included_files() as $file)
{
if (strpos($file,'adodb') !== false && !in_array($file,(array)$_SESSION['egw_required_files']) && isset($_SESSION))
if (strpos($file,'adodb') !== false && !in_array($file,(array)$_SESSION['egw_required_files']))
{
$_SESSION['egw_required_files'][] = $file;
//error_log(__METHOD__."() egw_required_files[] = $file");