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

[REF] Very minor cleanup #18604

Merged
merged 2 commits into from
Sep 26, 2020
Merged

[REF] Very minor cleanup #18604

merged 2 commits into from
Sep 26, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

This change just removes an unused variable & uses our shorter hook pattern

Before

 // CRM-9137
    if (!empty($params['id'])) {
      CRM_Utils_Hook::pre('edit', 'Activity', $params['id'], $params);
    }
    else {
      CRM_Utils_Hook::pre('create', 'Activity', NULL, $params);
    }

After

 $action = empty($params['id']) ? 'create' : 'edit';
  CRM_Utils_Hook::pre($action, 'Activity', $params['id'] ?? NULL, $params);

Technical Details

Comments

@civibot
Copy link

civibot bot commented Sep 26, 2020

(Standard links)

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