$result=db_query('SELECT c.cid FROM {comment} c INNER JOIN {node} n ON c.nid = n.nid WHERE c.status = :cstatus AND n.status = :nstatus AND n.type IN (:types) ORDER BY c.cid',[':cstatus'=>COMMENT_PUBLISHED,':nstatus'=>1,':types'=>$node_types]);
$message=\Drupal::translation()->formatPlural(count($results),'Node @nid has been re-scanned once to collect all links.','Node @nid has been re-scanned @count times to collect all links.',['@nid'=>$results[0]]);
}
else{
$message=t('Recurring scanning for links in node @nid has failed with an error.',['@nid'=>$results[0]]);
}
\Drupal::messenger()->addMessage($message);
}
/**
* Recurring scans of a single comment via batch API.
*
* @param int $cid
* The unique comment id to scan for links.
* @param int $missing_links_count
* The number of links not yet added to linkchecker_links table. By this
$message=\Drupal::translation()->formatPlural(count($results),'Comment @cid has been re-scanned once to collect all links.','Comment @cid has been re-scanned @count times to collect all links.',['@cid'=>$results[0]]);
}
else{
$message=t('Recurring scanning for links in comment @cid has failed with an error.',['@cid'=>$results[0]]);
}
\Drupal::messenger()->addMessage($message);
}
/**
* Recurring scans of a single block via batch API.
*
* @param int $bid
* The unique block id to scan for links.
* @param int $missing_links_count
* The number of links not yet added to linkchecker_links table. By this
$message=\Drupal::translation()->formatPlural(count($results),'Block @bid has been re-scanned once to collect all links.','Block @bid has been re-scanned @count times to collect all links.',['@bid'=>$results[0]]);
}
else{
$message=t('Recurring scanning for links in block @bid has failed with an error.',['@bid'=>$results[0]]);