Remove preferred_mail_format from tokens
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 21 Mar 2023 00:01:18 +0000 (13:01 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 21 Mar 2023 01:07:59 +0000 (14:07 +1300)
This also removes the handling from action schedule - there
might be a test checking it's presence to putting up
to adapt tests

CRM/Contact/Tokens.php
CRM/Core/BAO/ActionSchedule.php
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php

index 01c1e358a30c5b1774f4227e28b09aa224f462b4..de25925709ffda0730fc668f3906ec511f4db5be 100644 (file)
@@ -156,7 +156,6 @@ class CRM_Contact_Tokens extends CRM_Core_EntityTokens {
       'image_URL',
       'preferred_communication_method',
       'preferred_language',
-      'preferred_mail_format',
       'hash',
       'source',
       'first_name',
index 3ff899d91cb103a0c49f773fcd84eb93c9e0f0be..c63492d1470cf588c8fcd3d8f583ce1d38c22e76 100644 (file)
@@ -640,10 +640,8 @@ FROM civicrm_action_schedule cas
     $tp->addMessage('body_html', $schedule->body_html, 'text/html');
     $tp->addMessage('sms_body_text', $schedule->sms_body_text, 'text/plain');
     $tp->addMessage('subject', $schedule->subject, 'text/plain');
-    // These 2 are not 'real' tokens - but it tells the processor to load them.
+    // These is not a 'real' token - but it tells the processor to load them.
     $tp->addMessage('toName', '{contact.display_name}', 'text/plain');
-    $tp->addMessage('preferred_mail_format', '{contact.preferred_mail_format}', 'text/plain');
-
     return $tp;
   }
 
index 0377bbd046b11701d3f36092d93fe009c9305e94..73a2650df0ee70a87dc9c5cf92d22bf378bd194d 100644 (file)
@@ -691,7 +691,6 @@ emo
       '{contact.image_URL}' => 'Image Url',
       '{contact.preferred_communication_method:label}' => 'Preferred Communication Method',
       '{contact.preferred_language:label}' => 'Preferred Language',
-      '{contact.preferred_mail_format:label}' => 'Preferred Mail Format',
       '{contact.hash}' => 'Contact Hash',
       '{contact.source}' => 'Contact Source',
       '{contact.first_name}' => 'First Name',
@@ -792,7 +791,6 @@ emo
       'image_URL' => 'https://example.com',
       'preferred_communication_method' => 'Phone',
       'preferred_language' => 'fr_CA',
-      'preferred_mail_format' => 'Both',
       'hash' => 'xyz',
       'contact_source' => 'Contact Source',
       'first_name' => 'Robert',
@@ -987,7 +985,6 @@ nick_name:Bob
 image_URL:https://example.com
 preferred_communication_method:Phone
 preferred_language:fr_CA
-preferred_mail_format:Both
 hash:xyz
 contact_source:Contact Source
 first_name:Robert
@@ -1087,7 +1084,6 @@ nick_name |Bob
 image_URL |https://example.com
 preferred_communication_method:label |Phone
 preferred_language:label |French (Canada)
-preferred_mail_format:label |Both
 hash |xyz
 source |Contact Source
 first_name |Robert