comment_multiple_delete_confirm_submit
modules/comment/comment.admin.inc, строка 198
- Версии
- 5
comment_multiple_delete_confirm_submit(
$form_id,$form_values)- 6
comment_multiple_delete_confirm_submit($form, &$form_state)
Process comment_multiple_delete_confirm form submissions.
Perform the actual comment deletion.
Код
<?php
function comment_multiple_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
foreach ($form_state['values']['comments'] as $cid => $value) {
$comment = _comment_load($cid);
_comment_delete_thread($comment);
_comment_update_node_statistics($comment->nid);
}
cache_clear_all();
drupal_set_message(t('The comments have been deleted.'));
}
$form_state['redirect'] = 'admin/content/comment';
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии