Merge pull request #21916 from mattwire/recurprocessorid
[civicrm-core.git] / CRM / Campaign / BAO / Petition.php
index 72e2151a640f88cd0311b723df4243efee7a7227..5d3d55a5f0a94420cd07fc877251afa7e95eaabc 100644 (file)
@@ -448,27 +448,6 @@ AND         tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
     return $signature;
   }
 
-  /**
-   * This function returns all entities assigned to a specific tag.
-   *
-   * @param object $tag
-   *   An object of a tag.
-   *
-   * @return array
-   *   array of contact ids
-   */
-  public function getEntitiesByTag($tag) {
-    $contactIds = [];
-    $entityTagDAO = new CRM_Core_DAO_EntityTag();
-    $entityTagDAO->tag_id = $tag['id'];
-    $entityTagDAO->find();
-
-    while ($entityTagDAO->fetch()) {
-      $contactIds[] = $entityTagDAO->entity_id;
-    }
-    return $contactIds;
-  }
-
   /**
    * Check if contact has signed this petition.
    *
@@ -576,6 +555,8 @@ AND         tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
     // tokens then available in msg template as {$petition.title}, etc
     $petitionTokens['title'] = $petitionInfo['title'];
     $petitionTokens['petitionId'] = $params['sid'];
+    $tplParams['survey_id'] = $params['sid'];
+    $tplParams['petitionTitle'] = $petitionInfo['title'];
     $tplParams['petition'] = $petitionTokens;
 
     switch ($sendEmailMode) {