function linkchecker_update_6210 in Link checker 6.2
Add status code 302 to the default list of ignored response codes.
File
- ./
linkchecker.install, line 518 - Installation file for Link Checker module.
Code
function linkchecker_update_6210() {
$ret = array();
$ignore_response_codes = preg_split('/(\\r\\n?|\\n)/', variable_get('linkchecker_ignore_response_codes', "200\n302\n304\n401\n403"));
if (!in_array('302', $ignore_response_codes)) {
$ignore_response_codes[] = '302';
sort($ignore_response_codes);
variable_set('linkchecker_ignore_response_codes', implode("\n", $ignore_response_codes));
$ret[] = array(
'success' => TRUE,
'query' => 'Added the status code 302 to the list of ignored response codes.',
);
}
else {
$ret[] = array(
'success' => TRUE,
'query' => 'No action taken. The status code 302 was already on the list of ignored response codes.',
);
}
return $ret;
}