function linkchecker_admin_report_page in Link checker 6.2
Same name and namespace in other branches
- 7 linkchecker.pages.inc \linkchecker_admin_report_page()
Menu callback for general reporting.
1 string reference to 'linkchecker_admin_report_page'
- linkchecker_menu in ./
linkchecker.module - Implementation of hook_menu().
File
- includes/
linkchecker.pages.inc, line 11 - User page callbacks for the linkchecker module.
Code
function linkchecker_admin_report_page() {
$ignore_response_codes = preg_split('/(\\r\\n?|\\n)/', variable_get('linkchecker_ignore_response_codes', "200\n206\n302\n304\n401\n403"));
// Search for broken links in nodes and comments and blocks of all users.
// TODO: Try to make subselect result smaller.
$links_report_sql = "SELECT ll.*\n FROM {linkchecker_links} ll\n INNER JOIN (\n SELECT lid FROM (\n SELECT DISTINCT lid FROM {linkchecker_boxes}\n UNION\n SELECT DISTINCT lid FROM {linkchecker_comments}\n UNION\n SELECT DISTINCT lid FROM {linkchecker_nodes}\n ) q1\n ) q2 ON q2.lid = ll.lid\n WHERE ll.last_checked <> %d AND ll.status = %d AND ll.code NOT IN (" . db_placeholders($ignore_response_codes, 'int') . ")";
// Build the array variable with all parameters for the pager_query.
$links_report_parameters = array_merge(array(
0,
1,
), $ignore_response_codes);
return _linkchecker_report_page($links_report_sql, $links_report_parameters);
}