Skip to content
Snippets Groups Projects
Commit 35071ccc authored by lobo's avatar lobo
Browse files

Merge pull request #1964 from dlobo/CRM-13746

CRM-13746 - Enable delete hooks for Mailings
parents 9dae0079 4eeb36c8
Branches
Tags
No related merge requests found
......@@ -2298,6 +2298,8 @@ LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id
CRM_Core_Error::fatal();
}
CRM_Utils_Hook::pre('delete', 'Mailing', $id, CRM_Core_DAO::$_nullArray);
// delete all file attachments
CRM_Core_BAO_File::deleteEntityFile('civicrm_mailing',
$id
......@@ -2308,6 +2310,8 @@ LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id
$dao->delete();
CRM_Core_Session::setStatus(ts('Selected mailing has been deleted.'), ts('Deleted'), 'success');
CRM_Utils_Hook::post('delete', 'Mailing', $id, $dao);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment