Skip to content

Commit

Permalink
CRM-21334: Replace direct SQL query with BAO save call (to trigger ho…
Browse files Browse the repository at this point in the history
…oks)
  • Loading branch information
mickadoo committed Oct 19, 2017
1 parent 408deba commit 50fb017
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CRM/Contact/BAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,12 @@ public static function deleteContactImage($id) {
if (!$id) {
return FALSE;
}
$query = "
UPDATE civicrm_contact
SET image_URL=NULL
WHERE id={$id}; ";
CRM_Core_DAO::executeQuery($query);

$contact = new self();
$contact->id = $id;
$contact->image_URL = 'null';
$contact->save();

return TRUE;
}

Expand Down

0 comments on commit 50fb017

Please sign in to comment.