From: Kurund Jalmi Date: Sun, 17 Sep 2023 17:26:04 +0000 (+0100) Subject: code cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d28f02c4a31f9de6b631d844665c143bba82ee79;p=civicrm-core.git code cleanup --- diff --git a/ext/afform/core/Civi/Afform/Tokens.php b/ext/afform/core/Civi/Afform/Tokens.php index 5061a2718a..89d6f12a98 100644 --- a/ext/afform/core/Civi/Afform/Tokens.php +++ b/ext/afform/core/Civi/Afform/Tokens.php @@ -64,9 +64,10 @@ class Tokens extends AutoService implements EventSubscriberInterface { foreach ($tokenForms as $tokenName => $afform) { $e->tokens['afform']["afform.{$tokenName}Url"] = E::ts('%1 (URL)', [1 => $afform['title'] ?? $afform['name']]); $e->tokens['afform']["afform.{$tokenName}Link"] = E::ts('%1 (Full Hyperlink)', [1 => $afform['title'] ?? $afform['name']]); - $e->tokens['afform']["afform.{$tokenName}ValidateSubmissionUrl"] = E::ts('%1 Validate Submission URL)', [1 => $afform['title'] ?? $afform['name']]); - $e->tokens['afform']["afform.{$tokenName}ValidateSubmissionLink"] = E::ts('%1 Validate Submission (Full Hyperlink)', [1 => $afform['title'] ?? $afform['name']]); } + + $e->tokens['afform']["afform.validateSubmissionUrl"] = E::ts('Validate Submission URL)'); + $e->tokens['afform']["afform.validateSubmissionLink"] = E::ts('Validate Submission (Full Hyperlink)'); } /** diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Submit.php b/ext/afform/core/Civi/Api4/Action/Afform/Submit.php index 27c9557547..a6024dd050 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Submit.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Submit.php @@ -528,13 +528,13 @@ class Submit extends AbstractProcessor { // send email $emailParams = [ - 'id' => $this->_afform['email_confirmation_template_id'], + 'messageTemplateID' => $this->_afform['email_confirmation_template_id'], 'from' => "$domainEmailName <" . $domainEmailAddress . ">", 'toEmail' => $emailAddress, 'tokenContext' => $tokenContext, ]; - civicrm_api3('MessageTemplate', 'send', $emailParams); + \CRM_Core_BAO_MessageTemplate::sendTemplate($emailParams); } }