function _linkchecker_comment_links_missing in Link checker 6.2
Same name and namespace in other branches
- 5.2 linkchecker.module \_linkchecker_comment_links_missing()
- 7 linkchecker.module \_linkchecker_comment_links_missing()
Returns an array of comment references missing in the linkchecker_comments table.
1 call to _linkchecker_comment_links_missing()
- _linkchecker_add_comment_links in ./
linkchecker.module - Add comment links to database.
File
- ./
linkchecker.module, line 1298 - This module periodically check links in given node types, blocks, cck fields, etc.
Code
function _linkchecker_comment_links_missing($cid, $links) {
$res = db_query("SELECT url FROM {linkchecker_links} ll INNER JOIN {linkchecker_comments} lc ON ll.lid = lc.lid WHERE lc.cid = %d AND urlhash IN (" . db_placeholders($links, 'varchar') . ")", array_merge(array(
$cid,
), 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);
}