From c3fe0791813b40791ce9931539148ed1d59951ed Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 15 Nov 2021 02:24:49 +0000 Subject: [PATCH] [REF] dev/drupal#169 Replace other usages of session_id with CRM_Core_Config::singleton()->userSystem->getSessionId --- CRM/Core/IDS.php | 3 ++- CRM/Report/Form.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php index 359ff77e56..3efdac401b 100644 --- a/CRM/Core/IDS.php +++ b/CRM/Core/IDS.php @@ -237,13 +237,14 @@ class CRM_Core_IDS { $data = []; $session = CRM_Core_Session::singleton(); + $session_id = CRM_Core_Config::singleton()->userSystem->getSessionId() ? CRM_Core_Config::singleton()->userSystem->getSessionId() : '0'; foreach ($result as $event) { $data[] = [ 'name' => $event->getName(), 'value' => stripslashes($event->getValue()), 'page' => $_SERVER['REQUEST_URI'], 'userid' => $session->get('userID'), - 'session' => session_id() ? session_id() : '0', + 'session' => $session_id, 'ip' => $ip, 'reaction' => $reaction, 'impact' => $result->getImpact(), diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 40b3e19a77..2d015a178e 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2478,7 +2478,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND $this->assign('chartEnabled', TRUE); $this->_chartId = "{$this->_params['charts']}_" . ($this->_id ? $this->_id : substr(get_class($this), 16)) . '_' . - session_id(); + CRM_Core_Config::singleton()->userSystem->getSessionId(); $this->assign('chartId', $this->_chartId); } -- 2.25.1