From 8c30429d53e0a9206f5b66ec718a471302e64a34 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 25 Sep 2020 13:33:12 +0200 Subject: [PATCH] small change in session-handler to be able to set a session-id for Collabora --- api/src/Session.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Session.php b/api/src/Session.php index 5993ed481f..44c0f9713e 100644 --- a/api/src/Session.php +++ b/api/src/Session.php @@ -2019,10 +2019,11 @@ class Session /** * Initialise the used session handler * + * @param string? $sessionid =null default use self::get_sessionid() * @return boolean true if we have a session, false otherwise * @throws \ErrorException if there is no PHP session support */ - public static function init_handler() + public static function init_handler($sessionid=null) { switch(session_status()) { @@ -2032,7 +2033,7 @@ class Session if (headers_sent()) return false; // only gives warnings ini_set('session.use_cookies',0); // disable the automatic use of cookies, as it uses the path / by default session_name(self::EGW_SESSION_NAME); - if (($sessionid = self::get_sessionid())) + if (isset($sessionid) || ($sessionid = self::get_sessionid())) { session_id($sessionid); self::cache_control();