function linkchecker_report in Link checker 5
menu callback for reporting
1 string reference to 'linkchecker_report'
- linkchecker_menu in ./
linkchecker.module - Implementation of hook_menu().
File
- ./
linkchecker.module, line 147 - This module periodically check html links referenced by drupal nodes Developed and maintained by Marek Tichy, marek@ecn.cz
Code
function linkchecker_report() {
$header = array(
array(
'data' => t('Node'),
'field' => 'nodeid',
'sort' => 'desc',
),
array(
'data' => t('URL'),
'field' => 'url',
'sort' => 'desc',
),
array(
'data' => t('Error'),
'field' => 'response',
),
);
$result = pager_query('SELECT * FROM `linkchecker_tasks` INNER JOIN linkchecker_results ON linkchecker_tasks.taskid = linkchecker_results.taskid ' . tablesort_sql($header), 3000, 0, 'SELECT COUNT(*) `linkchecker_tasks`;');
while ($foo = db_fetch_object($result)) {
$rows[] = array(
'<a href="/node/' . $foo->nodeid . '">' . $foo->nodeid . '</a>',
$foo->url,
$foo->response,
);
}
drupal_set_title(check_plain($node->title));
$output = theme('table', $header, $rows);
$output .= theme('pager', NULL, 3000, 0);
print theme('page', $output, FALSE);
}