function _heartbeat_comments_delete in Heartbeat 7
Same name and namespace in other branches
- 6.4 modules/heartbeat_comments/heartbeat_comments.module \_heartbeat_comments_delete()
Deletes a heartbeat comment.
3 calls to _heartbeat_comments_delete()
- heartbeat_comments_admin_overview_submit in modules/
heartbeat_comments/ heartbeat_comments.admin.inc - Process heartbeat_comments_admin_overview form submissions.
- heartbeat_comments_delete_confirm_submit in modules/
heartbeat_comments/ heartbeat_comments.module - Submit callback te delete a heartbeat comment.
- heartbeat_comments_multiple_delete_confirm_submit in modules/
heartbeat_comments/ heartbeat_comments.admin.inc - Process comment_multiple_delete_confirm form submissions.
File
- modules/
heartbeat_comments/ heartbeat_comments.module, line 1063 - Heartbeat comments for activity.
Code
function _heartbeat_comments_delete($hcid) {
$row = db_query("SELECT uaid FROM {heartbeat_comments} WHERE hcid = :hcid", array(
':hcid' => $hcid,
))
->fetchObject();
db_delete('heartbeat_comments')
->condition('hcid', $hcid)
->execute();
$settings = $pluginWrapper = heartbeat_plugins_get_plugin('activitycomments')
->getPlugin()
->getSettings();
if ($settings['heartbeat_comments_cache']) {
cache_clear_all('heartbeat:comments:' . $row->uaid . ':0', 'cache');
}
}