Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommunicationPreferences 'loclize' -> 'localize' #16633

Merged
merged 1 commit into from
Feb 26, 2020
Merged

CommunicationPreferences 'loclize' -> 'localize' #16633

merged 1 commit into from
Feb 26, 2020

Conversation

alexymik
Copy link
Contributor

Overview

Localize option for getting communication preferences on edit form has a typo.

Technical Details

CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'preferred_communication_method', ['localize' => TRUE]);
class CRM_Core_PseudoConstant {
  [...]
  public static function get($daoName, $fieldName, $params = [], $context = NULL) {
    [...]
    // Historically this was 'false' but according to the notes in
    // CRM_Core_DAO::buildOptionsContext it should be context dependent.
    // timidly changing for 'search' only to fix world_region in search options.
    $localizeDefault = in_array($context, ['search']) ? TRUE : FALSE;
    // Merge params with defaults
    $params += [
      'localize' => $localizeDefault,
    [...]

@civibot
Copy link

civibot bot commented Feb 26, 2020

(Standard links)

@civibot civibot bot added the master label Feb 26, 2020
@alexymik alexymik changed the title 'loclize' -> 'localize' CommunicationPreferences 'loclize' -> 'localize' Feb 26, 2020
@colemanw
Copy link
Member

Thanks for the PR. I'm going to merge this as it's an obvious typo and tests are passing.

@colemanw colemanw merged commit 2789392 into civicrm:master Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants