From d3600e95d05f25e1561d741e23d7804ac82da9ba Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 6 Jun 2014 18:32:24 -0700 Subject: [PATCH] CRM-14811 - Add setting "enable_innodb_fts". Changes trigger InnoDBIndexer->fixSchemaDifferences. --- CRM/Core/InnoDBIndexer.php | 3 ++- settings/Core.setting.php | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CRM/Core/InnoDBIndexer.php b/CRM/Core/InnoDBIndexer.php index a505feec53..c9bc4c9af7 100644 --- a/CRM/Core/InnoDBIndexer.php +++ b/CRM/Core/InnoDBIndexer.php @@ -59,7 +59,8 @@ class CRM_Core_InnoDBIndexer { array('name'), ), ); - self::$singleton = new self(TRUE, $indices); + $active = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE); + self::$singleton = new self($active, $indices); } return self::$singleton; } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 556dad263c..d637664f83 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -714,4 +714,23 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.', 'help_text' => null, ), + 'enable_innodb_fts' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'enable_innodb_fts', + 'prefetch' => 0, + 'config_only'=> 0, + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.4', + 'title' => 'InnoDB Full Text Search', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => "Enable InnoDB full-text search optimizations. (Requires MySQL 5.6+)", + 'help_text' => null, + 'on_change' => array( + array('CRM_Core_InnoDBIndexer', 'onToggleFts'), + ), + ), ); -- 2.25.1