'filter_type' => 'xml',
'filter_path' => "{$pkgs}/IDS/default_filter.xml",
'tmp_path' => $tmpDir,
- 'HTML_Purifier_Path' => $pkgs . '/IDS/vendors/htmlpurifier/HTMLPurifier.auto.php',
+ // Ignored, uses autoloader
+ 'HTML_Purifier_Path' => TRUE,
'HTML_Purifier_Cache' => $tmpDir,
'scan_keys' => '',
'exceptions' => ['__utmz', '__utmc'],
/**
* This function writes an entry about the intrusion to the database.
*
- * @param array $result
+ * @param IDS_Report $result
* @param int $reaction
*
* @return bool
$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(),