Merge pull request #4289 from colemanw/CRM-15130
[civicrm-core.git] / bin / deprecated / UpdateGreeting.php
index 5f35d2f053111e14cce030a7a1ca28aa63d20683..c7004cd7d6be763ba254904e42e9bd5fe6d5371b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                               |
+ | CiviCRM version 4.5                                               |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  * IMPORTANT: You must first create valid option value before using via admin interface.
  * Check option lists for Email Greetings, Postal Greetings and Addressee
  */
+
+/**
+ * Class CRM_UpdateGreeting
+ */
 class CRM_UpdateGreeting {
+  /**
+   *
+   */
   function __construct() {
     $this->initialize();
 
@@ -202,7 +209,7 @@ SELECT DISTINCT id, $idFldName
           $contactIds[] = $contactID;
         }
       }
-      CRM_Utils_Token::replaceGreetingTokens($greetingString, $contactDetails, $contactID, 'CRM_UpdateGreeting');
+      CRM_Contact_BAO_Contact_Utils::processGreetingTemplate($greetingString, $contactDetails, $contactID, 'CRM_UpdateGreeting');
       $greetingString = CRM_Core_DAO::escapeString($greetingString);
       $cacheFieldQuery .= " WHEN {$contactID} THEN '{$greetingString}' ";