You are here

function comment_sort_created_check_tables_in_sync_operation in Comment sort by created 7

Batch operation callback for table sync.

1 string reference to 'comment_sort_created_check_tables_in_sync_operation'
comment_sort_created_check_tables_in_sync in ./comment_sort_created.module
Check tables for missing entries.

File

./comment_sort_created.module, line 224
Sorts comments by creation date.

Code

function comment_sort_created_check_tables_in_sync_operation($cid) {
  $comment = comment_load($cid);

  // Generate a thread string based upon the creation date.
  $created_thread = comment_sort_created_get_timestamp_thread($comment);

  // Write new entry to table.
  $record = array(
    'cid' => $cid,
    'created_thread' => $created_thread,
  );
  drupal_write_record('comment_sort_created', $record);
}