From 509e50b790b6114fcc3f48a465e63271b8c6a0a2 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 7 Jul 2016 18:29:00 +1200 Subject: [PATCH] CRM-19051 Logging - setting to allow offline triggers not respected in all cases --- CRM/Logging/Schema.php | 4 ++-- CRM/Upgrade/Form.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index 402a77df52..38491ddbe8 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -753,8 +753,8 @@ COLS; * Predicate whether logging is enabled. */ public function isEnabled() { - if (CRM_Core_Config::singleton()->logging) { - return $this->tablesExist() and $this->triggersExist(); + if (\Civi::settings()->get('logging')) { + return ($this->tablesExist() && (\Civi::settings()->get('logging_no_trigger_permission') || $this->triggersExist())); } return FALSE; } diff --git a/CRM/Upgrade/Form.php b/CRM/Upgrade/Form.php index 38e3b0205e..64897240d1 100644 --- a/CRM/Upgrade/Form.php +++ b/CRM/Upgrade/Form.php @@ -491,7 +491,7 @@ SET version = '$version' } // check for mysql trigger privileges - if (!CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE)) { + if (!\Civi::settings()->get('logging_no_trigger_permission') && !CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE)) { $error = ts('CiviCRM %1 requires MySQL trigger privileges.', array(1 => $latestVer)); } -- 2.25.1