From babfca87850a5b9f66a8c0797ff16c909d2962f9 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 28 Dec 2018 08:37:52 +1100 Subject: [PATCH] dev/core#594 Fix issue where editor_id is expected to be keyed on name not on value Add in a post upgrade message encourging people to check their editor setting --- CRM/Upgrade/Incremental/php/FiveNine.php | 3 ++- api/v3/Setting.php | 6 +++++- settings/Core.setting.php | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Upgrade/Incremental/php/FiveNine.php b/CRM/Upgrade/Incremental/php/FiveNine.php index 1f5f9fef12..a7a8493388 100644 --- a/CRM/Upgrade/Incremental/php/FiveNine.php +++ b/CRM/Upgrade/Incremental/php/FiveNine.php @@ -60,7 +60,8 @@ class CRM_Upgrade_Incremental_php_FiveNine extends CRM_Upgrade_Incremental_Base 1 => ts('Enable multiple bulk email address for a contact'), 2 => ts('Email on Hold'), ); - $postUpgradeMessage .= '

' . ts('If the setting "%1" is enabled, you should update any smart groups based on the "%2" field.', $args) . '

'; + $postUpgradeMessage .= '

' . ts('If the setting "%1" is enabled, you should update any smart groups based on the "%2" field.', $args) . '

' . + '

' . ts('If you were previously on version 5.8 and you altered your WYSIWYG editor setting you should visit the Display Preferences page and check the editor setting', array(1 => 'href="' . CRM_Utils_System::url('civicrm/admin/setting/preferences/display', 'reset=1') . '"')) . '

'; } // Example: Generate a post-upgrade message. diff --git a/api/v3/Setting.php b/api/v3/Setting.php index f9921fa12a..29df94b76e 100644 --- a/api/v3/Setting.php +++ b/api/v3/Setting.php @@ -161,8 +161,12 @@ function civicrm_api3_setting_getoptions($params) { return civicrm_api3_create_success($values, $params, 'Setting', 'getoptions'); } elseif (!empty($pseudoconstant['optionGroupName'])) { + $keyColumn = 'value'; + if (!empty($pseudoconstant['keyColumn'])) { + $keyColumn = $pseudoconstant['keyColumn']; + } return civicrm_api3_create_success( - CRM_Core_OptionGroup::values($pseudoconstant['optionGroupName'], FALSE, FALSE, TRUE), + CRM_Core_OptionGroup::values($pseudoconstant['optionGroupName'], FALSE, FALSE, TRUE, NULL, 'label', TRUE, FALSE, $keyColumn), $params, 'Setting', 'getoptions' ); } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index afc5566b6d..57f299c598 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -220,6 +220,7 @@ return array( 'title' => ts('Wysiwig Editor'), 'pseudoconstant' => array( 'optionGroupName' => 'wysiwyg_editor', + 'keyColumn' => 'name', ), 'is_domain' => 1, 'is_contact' => 0, -- 2.25.1