From: Olivier Tétard Date: Thu, 3 Mar 2016 10:47:05 +0000 (+0100) Subject: CRM-18037: default value for preferred_mail_format should be 'Both'. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2515d7ff83c35b7a3347f8de2fac8078c5489a7b;p=civicrm-core.git CRM-18037: default value for preferred_mail_format should be 'Both'. Default value should be “Both”, there is no need to find the translated text for it. This prevents from having an empty default in translated installations of CiviCRM. --- diff --git a/CRM/Contact/Form/Edit/CommunicationPreferences.php b/CRM/Contact/Form/Edit/CommunicationPreferences.php index ed3e4dbe8c..03ba749b80 100644 --- a/CRM/Contact/Form/Edit/CommunicationPreferences.php +++ b/CRM/Contact/Form/Edit/CommunicationPreferences.php @@ -166,7 +166,7 @@ class CRM_Contact_Form_Edit_CommunicationPreferences { // CRM-17778 -- set preferred_mail_format to default if unset if (empty($defaults['preferred_mail_format'])) { - $defaults['preferred_mail_format'] = array_search('Both', CRM_Core_SelectValues::pmf()); + $defaults['preferred_mail_format'] = 'Both'; } //set default from greeting types CRM-4575, CRM-9739