function _linkchecker_block_custom_links_missing in Link checker 7
Returns an array of custom block references missing in the linkchecker_block_custom table.
Parameters
int $bid: The block ID.
array $links: An array of links.
Return value
array An array of custom block references missing in the linkchecker_block_custom table.
1 call to _linkchecker_block_custom_links_missing()
- _linkchecker_add_block_custom_links in ./
linkchecker.module - Add custom block links to database.
File
- ./
linkchecker.module, line 1691 - This module periodically check links in given node types, blocks etc.
Code
function _linkchecker_block_custom_links_missing($bid, $links) {
$result = db_query('SELECT ll.url FROM {linkchecker_link} ll INNER JOIN {linkchecker_block_custom} lb ON lb.lid = ll.lid WHERE lb.bid = :bid AND ll.urlhash IN (:urlhashes)', array(
':bid' => $bid,
':urlhashes' => array_map('drupal_hash_base64', $links),
));
$links_in_database = array();
foreach ($result as $row) {
$links_in_database[] = $row->url;
}
return array_diff($links, $links_in_database);
}