You are here

function _linkchecker_box_links_missing in Link checker 5.2

Same name and namespace in other branches
  1. 6.2 linkchecker.module \_linkchecker_box_links_missing()

Returns an array of box references missing in the linkchecker_boxes table.

1 call to _linkchecker_box_links_missing()
_linkchecker_add_box_links in ./linkchecker.module
Add box links to database.

File

./linkchecker.module, line 1299
This module periodically check links in given node types, blocks, cck fields, etc.

Code

function _linkchecker_box_links_missing($bid, $links) {
  $placeholders = implode(',', array_fill(0, count($links), "'%s'"));
  $res = db_query("SELECT url FROM {linkchecker_links} ll INNER JOIN {linkchecker_boxes} lb ON ll.lid = lb.lid WHERE lb.bid = %d AND token IN (" . $placeholders . ")", array_merge(array(
    $bid,
  ), array_map('md5', $links)));
  $links_in_database = array();
  while ($row = db_fetch_object($res)) {
    $links_in_database[] = $row->url;
  }
  return array_diff($links, $links_in_database);
}