Remove now-silly function
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 30 Sep 2021 22:22:53 +0000 (11:22 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 30 Sep 2021 22:22:53 +0000 (11:22 +1300)
CRM/Contact/Form/Task/EmailTrait.php

index da674268c3bb0982f2bee3cf76a4499cc421d4d7..f4537c46cebc60333ed0716d335a8e5171a49d94 100644 (file)
@@ -120,7 +120,6 @@ trait CRM_Contact_Form_Task_EmailTrait {
    * @throws \API_Exception
    */
   protected function traitPreProcess() {
-    $this->preProcessFromAddress();
     if ($this->isSearchContext()) {
       // Currently only the contact email form is callable outside search context.
       parent::preProcess();
@@ -132,22 +131,6 @@ trait CRM_Contact_Form_Task_EmailTrait {
     }
   }
 
-  /**
-   * Pre Process Form Addresses to be used in Quickform
-   *
-   * @throws \API_Exception
-   * @throws \CRM_Core_Exception
-   */
-  protected function preProcessFromAddress(): void {
-    $form = $this;
-    $form->_emails = [];
-
-    // @TODO remove these line and to it somewhere more appropriate. Currently some classes (e.g Case
-    // are having to re-write contactIds afterwards due to this inappropriate variable setting
-    // If we don't have any contact IDs, use the logged in contact ID
-    $form->_contactIds = $form->_contactIds ?: [CRM_Core_Session::getLoggedInContactID()];
-  }
-
   /**
    * Build the form object.
    *