You are here

function signature_forum_build_signature_status in Signatures for Forums 6

Set all existing comments to not have a signature to avoid duplicate signatures.

2 calls to signature_forum_build_signature_status()
signature_forum_install in ./signature_forum.install
Implementation of hook_install().
signature_forum_update_6100 in ./signature_forum.install
Implementation of hook_update_n().

File

./signature_forum.install, line 76
Installs, updates and uninstalls signature_forum module.

Code

function signature_forum_build_signature_status() {

  // Deal with nodecomments and standard nodes.
  db_query("INSERT INTO {signature_post} (delta, type, status)\n    SELECT nid, 'node', 1\n    FROM {node}");

  // Deal with standard Drupal comments.
  if (module_exists('comment')) {
    db_query("INSERT INTO {signature_post} (delta, type, status)\n      SELECT cid, 'comment', 1\n      FROM {comments}");
  }
}