You are here

function linkchecker_update_6205 in Link checker 6.2

Remove any references to nodes that are not published and also remove their comments references.

File

./linkchecker.install, line 444
Installation file for Link Checker module.

Code

function linkchecker_update_6205() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {linkchecker_nodes} WHERE nid IN (SELECT nid FROM {node} WHERE status = 0)");
  $ret[] = update_sql("DELETE FROM {linkchecker_comments} WHERE cid IN (SELECT c.cid FROM {node} n INNER JOIN {comments} c ON c.nid = n.nid WHERE n.status = 0)");
  return $ret;
}