function _linkchecker_redirect_reset in Link checker 7
Same name and namespace in other branches
- 8 linkchecker.redirect.inc \_linkchecker_redirect_reset()
Reset last_checked status.
Parameters
array $urls: An array of urls that should be checked on next cron run.
1 call to _linkchecker_redirect_reset()
- linkchecker_redirect_update in ./
linkchecker.redirect.inc - Implements hook_redirect_update().
File
- ./
linkchecker.redirect.inc, line 39 - Redirect interface to linkchecker functionalities.
Code
function _linkchecker_redirect_reset($urls = array()) {
$urls = array_unique($urls);
$num_updated = db_update('linkchecker_link')
->condition('urlhash', array_map('drupal_hash_base64', $urls))
->condition('fail_count', 0, '>')
->condition('status', 1)
->fields(array(
'last_checked' => 0,
))
->execute();
if ($num_updated) {
drupal_set_message(t('The link %url will be checked again on the next cron run.', array(
'%url' => $urls[0],
)));
}
}