Skip to content

Commit

Permalink
Merge pull request #13740 from civicrm/5.11
Browse files Browse the repository at this point in the history
5.11
  • Loading branch information
eileenmcnaughton authored Mar 1, 2019
2 parents e4467bd + 91f4ec9 commit fa7827a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -3015,10 +3015,13 @@ public function group($values) {
if (count($regularGroupIDs) > 1) {
$op = strpos($op, 'IN') ? $op : ($op == '!=') ? 'NOT IN' : 'IN';
}
$groupIds = CRM_Utils_Type::validate(
implode(',', (array) $regularGroupIDs),
'CommaSeparatedIntegers'
);
$groupIds = '';
if (!empty($regularGroupIDs)) {
$groupIds = CRM_Utils_Type::validate(
implode(',', (array) $regularGroupIDs),
'CommaSeparatedIntegers'
);
}
$gcTable = "`civicrm_group_contact-" . uniqid() . "`";
$joinClause = array("contact_a.id = {$gcTable}.contact_id");

Expand Down
6 changes: 5 additions & 1 deletion CRM/Contribute/Form/Task/PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,12 @@ public function postProcess() {

$values = array();
if (isset($params['from_email_address']) && !$elements['createPdf']) {
// If a logged in user from email is used rather than a domain wide from email address
// the from_email_address params key will be numerical and we need to convert it to be
// in normal from email format
$from = CRM_Utils_Mail::formatFromAddress($params['from_email_address']);
// CRM-19129 Allow useres the choice of From Email to send the receipt from.
$fromDetails = explode(' <', $params['from_email_address']);
$fromDetails = explode(' <', $from);
$input['receipt_from_email'] = substr(trim($fromDetails[1]), 0, -1);
$input['receipt_from_name'] = str_replace('"', '', $fromDetails[0]);
}
Expand Down

0 comments on commit fa7827a

Please sign in to comment.