Skip to content
Snippets Groups Projects
Commit fe979dec authored by Alexander Hass's avatar Alexander Hass
Browse files

#1804842 follow up: Exit if all node types are disabled

parent b40ab099
No related branches found
No related tags found
No related merge requests found
linkchecker 6.x-dev, nightly
----------------------------
* #1804842 follow up: Exit if all node types are disabled
* #1450672: Cron task does not impersonate to admin user on automatic content updates.
* Added Drupal 6.14 warning to known issues.
* #1804842: Lots of warnings when comment module is not installed
......
......@@ -171,10 +171,12 @@ function _linkchecker_link_access($link) {
function _linkchecker_link_node_ids($link, $node_author_account = NULL) {
static $fields_with_node_links = array();
// If the user cannot access content, there is no need to check further.
if (!user_access('access content')) {
return array();
}
// Exit if all node types are disabled or if the user cannot access content,
// there is no need to check further.
$linkchecker_scan_nodetypes = array_filter(variable_get('linkchecker_scan_nodetypes', array()));
if (empty($linkchecker_scan_nodetypes) || !user_access('access content')) {
return array();
}
// Disable language negotiation temporarily, re-enable it later.
if (module_exists('i18n')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment