comment_admin_overview_submit

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/comment/comment.module, строка 1215

Версии
5
comment_admin_overview_submit($form_id, $form_values)
6
comment_admin_overview_submit($form, &$form_state)

Execute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.

Код

<?php
function comment_admin_overview_submit($form_id, $form_values) {
  $operations = comment_operations();
  if ($operations[$form_values['operation']][1]) {
    // extract the appropriate database query operation
    $query = $operations[$form_values['operation']][1];
    foreach ($form_values['comments'] as $cid => $value) {
      if ($value) {
        // perform the update action, then refresh node statistics
        db_query($query, $cid);
        $comment = _comment_load($cid);
        _comment_update_node_statistics($comment->nid);
        // Allow modules to respond to the updating of a comment.
        comment_invoke_comment($comment, $form_values['operation']);
        // Add an entry to the watchdog log.
        watchdog('content', t('Comment: updated %subject.', array('%subject' => $comment->subject)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid));
      }
    }
    cache_clear_all();
    drupal_set_message(t('The update has been performed.'));
    return 'admin/content/comment';
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему