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

#1488572: i18n: "Permission restrictions deny" all broken links in other

languages
parent c9274725
No related branches found
No related tags found
No related merge requests found
......@@ -176,6 +176,11 @@ function _linkchecker_link_node_ids($link, $node_author_account = NULL) {
return array();
}
// Disable language negotiation temporarily, re-enable it later.
if (module_exists('i18n')) {
i18n_selection_mode('off');
}
// Get a list of nodes containing the link, using db_rewrite_sql() to allow
// node access modules to exclude nodes that the current user does not have
// access to view.
......@@ -193,6 +198,11 @@ function _linkchecker_link_node_ids($link, $node_author_account = NULL) {
WHERE ln.lid = %d'), $link->lid);
}
// Re-enable language negotiation.
if (module_exists('i18n')) {
i18n_selection_mode('reset');
}
// Check if the current user has access to view the link in each node.
// However, for performance reasons, as soon as we find one node where that
// is the case, stop checking and return the remainder of the list.
......
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