From 0bb407782b810c32a81e0ad42af67a435b44c845 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 15 Nov 2021 02:26:20 +0000 Subject: [PATCH] [REF] dev/drupal#169 Replace other usages of session_id with CRM_Core_Config::singleton()->userSystem->getSessionId --- kcfinder/core/class/browser.php | 8 ++++---- kcfinder/core/class/uploader.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kcfinder/core/class/browser.php b/kcfinder/core/class/browser.php index 36d135091..4421d5860 100644 --- a/kcfinder/core/class/browser.php +++ b/kcfinder/core/class/browser.php @@ -526,7 +526,7 @@ protected function act_downloadDir() { $this->errorMsg("Unknown error."); $filename = basename($dir) . ".zip"; do { - $file = md5(time() . session_id()); + $file = md5(time() . CRM_Core_Config::singleton()->userSystem->getSessionId()); $file = "{$this->config['uploadDir']}/$file.zip"; } while (file_exists($file)); new zipFolder($file, $dir); @@ -559,7 +559,7 @@ protected function act_downloadSelected() { } do { - $file = md5(time() . session_id()); + $file = md5(time() . CRM_Core_Config::singleton()->userSystem->getSessionId()); $file = "{$this->config['uploadDir']}/$file.zip"; } while (file_exists($file)); @@ -601,7 +601,7 @@ protected function act_downloadClipboard() { } do { - $file = md5(time() . session_id()); + $file = md5(time() . CRM_Core_Config::singleton()->userSystem->getSessionId()); $file = "{$this->config['uploadDir']}/$file.zip"; } while (file_exists($file)); @@ -919,4 +919,4 @@ protected function htmlData($str) { } } -?> \ No newline at end of file +?> diff --git a/kcfinder/core/class/uploader.php b/kcfinder/core/class/uploader.php index d2b0a3be4..e2c34d92f 100644 --- a/kcfinder/core/class/uploader.php +++ b/kcfinder/core/class/uploader.php @@ -115,7 +115,7 @@ public function __construct() { require "conf/config.php"; // SETTING UP SESSION - if (!session_id()) { + if (!CRM_Core_Config::singleton()->userSystem->getSessionId()) { if (isset($_CONFIG['_sessionLifetime'])) ini_set('session.gc_maxlifetime', $_CONFIG['_sessionLifetime'] * 60); if (isset($_CONFIG['_sessionDir']))