Skip to content

Commit

Permalink
Merge pull request #11985 from JMAConsulting/devcore48
Browse files Browse the repository at this point in the history
dev/core#48 Fix PDF Letter only generates a single letter when multiple contact IDs are specified
  • Loading branch information
eileenmcnaughton authored Apr 17, 2018
2 parents 733a402 + fb622d6 commit f34fb1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CRM/Case/Form/Task/PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class CRM_Case_Form_Task_PDF extends CRM_Case_Form_Task {
* Build all the data structures needed to build the form.
*/
public function preProcess() {
CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
$this->skipOnHold = $this->skipDeceased = FALSE;
parent::preProcess();
$this->setContactIDs();
CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions CRM/Contact/Form/Task/EmailCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ public static function preProcessFromAddress(&$form, $bounce = TRUE) {

$form->_emails = array();

$contactID = CRM_Core_Session::singleton()->getLoggedInContactID();
$form->_contactIds = array($contactID);
// @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()];

$fromEmailValues = CRM_Core_BAO_Email::getFromEmail();

Expand Down

0 comments on commit f34fb1a

Please sign in to comment.