function _cloudflare_delete_comment in CloudFlare 7
Same name and namespace in other branches
- 6 cloudflare.module \_cloudflare_delete_comment()
Delete comment.
2 calls to _cloudflare_delete_comment()
File
- ./
cloudflare.module, line 500
Code
function _cloudflare_delete_comment($cid) {
$comment = comment_load($cid);
// hackity hacky hack: set error reporting to hide errors due to bug report http://drupal.org/node/1761042
//error_reporting(E_ALL ^ E_NOTICE);
//error_reporting(0);
$num_deleted = db_delete('comment')
->condition('cid', $cid)
->execute();
if ($num_deleted > 0) {
watchdog('action', t("Comment #%id has been deleted.", array(
'%id' => $cid,
)));
}
}