Skip to content
Snippets Groups Projects
Commit a39ef8af authored by Eileen's avatar Eileen
Browse files

CRM-14008 alter update greeting to update blanks as well as null

----------------------------------------
* CRM-14008: Addressee greetings not being updated when they are empty
  http://issues.civicrm.org/jira/browse/CRM-14008
parent 91baec38
Branches
Tags
No related merge requests found
......@@ -989,8 +989,12 @@ Group By componentId";
$sql = "SELECT DISTINCT id, $idFldName FROM civicrm_contact WHERE contact_type = %1 ";
}
else {
$sql = "SELECT DISTINCT id, $idFldName FROM civicrm_contact WHERE contact_type = %1
AND ( {$idFldName} IS NULL OR ( {$idFldName} IS NOT NULL AND {$displayFldName} IS NULL ) ) ";
$sql = "
SELECT DISTINCT id, $idFldName
FROM civicrm_contact
WHERE contact_type = %1
AND ({$idFldName} IS NULL
OR ( {$idFldName} IS NOT NULL AND ({$displayFldName} IS NULL OR {$displayFldName} = '')) )";
}
$dao = CRM_Core_DAO::executeQuery($sql, array(1 => array($contactType, 'String')));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment