Commit babfca87 authored by Seamus Lee's avatar Seamus Lee

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
parent 165a5ec6
......@@ -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 .= '<p>' . ts('If the setting "%1" is enabled, you should update any smart groups based on the "%2" field.', $args) . '</p>';
$postUpgradeMessage .= '<p>' . ts('If the setting "%1" is enabled, you should update any smart groups based on the "%2" field.', $args) . '</p>' .
'<p>' . ts('If you were previously on version 5.8 and you altered your WYSIWYG editor setting you should visit the <a %1>Display Preferences</a> page and check the editor setting', array(1 => 'href="' . CRM_Utils_System::url('civicrm/admin/setting/preferences/display', 'reset=1') . '"')) . '</p>';
}
// Example: Generate a post-upgrade message.
......
......@@ -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'
);
}
......
......@@ -220,6 +220,7 @@ return array(
'title' => ts('Wysiwig Editor'),
'pseudoconstant' => array(
'optionGroupName' => 'wysiwyg_editor',
'keyColumn' => 'name',
),
'is_domain' => 1,
'is_contact' => 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment