You are here

function facebook_comments_node_update in Facebook Comments Social Plugin 7

Implements hook_node_update().

File

./facebook_comments.module, line 363
Facebook Comments Social Plugin module file.

Code

function facebook_comments_node_update($node) {
  if (isset($node->facebook_comments_enabled)) {
    db_merge('facebook_comments')
      ->key(array(
      'nid' => $node->nid,
    ))
      ->fields(array(
      'enabled' => $node->facebook_comments_enabled,
      'amount' => $node->facebook_comments_amount,
    ))
      ->execute();
  }
}