Project

General

Profile

Bug #12235 ยป typo3-sysext-linkvalidator2.diff

Andreas Lappe, 2011-01-14 18:56

View differences:

typo3/sysext/linkvalidator/classes/linktypes/class.tx_linkvalidator_linktypes_external.php
// analyze the response
if ($report['error']) {
if ($report['lib'] === 'cURL' && $report['error'] === 28) {
$errorParams['errorType'] = 'cURL28';
} elseif ($report['lib'] === 'cURL' && $report['error'] === 22) {
if (strstr($report['message'], '404')) {
$errorParams['errorType'] = 404;
} elseif(strstr($report['message'], '403')) {
$errorParams['errorType'] = 403;
} elseif(strstr($report['message'], '500')) {
$errorParams['errorType'] = 500;
}
} elseif ($report['lib'] === 'cURL' && $report['error'] === 6) {
$errorParams['errorType'] = 'cURL6';
} elseif ($report['lib'] === 'cURL' && $report['error'] === 56) {
$errorParams['errorType'] = 'cURL56';
}
$response = FALSE;
}
......
$response = $GLOBALS['LANG']->getLL('list.report.pageforbidden403');
break;
case 500:
$response = $GLOBALS['LANG']->getLL('list.report.internalerror500');
break;
case 'cURL6':
$response = $GLOBALS['LANG']->getLL('list.report.couldnotresolvehost');
break;
case 'cURL56':
$response = $GLOBALS['LANG']->getLL('list.report.recverror');
break;
case 'cURL28':
$response = $GLOBALS['LANG']->getLL('list.report.timeout');
break;
default:
$response = $GLOBALS['LANG']->getLL('list.report.noresponse');
}
typo3/sysext/linkvalidator/modfunc1/locallang.xml
<label index="list.report.pagenotfound404">The requested url was not found (404).</label>
<label index="list.report.externalerror">External Link returned HTTP error code (%s).</label>
<label index="list.report.filenotexisting">File doesn't exist.</label>
<label index="list.report.timeout">Operation timeout. The specified time-out period was reached according to the conditions.</label>
<label index="list.report.internalerror500">Internal Server Error (500)</label>
<label index="list.report.couldnotresolvehost">Couldn't resolve host. The given remote host was not resolved.</label>
<label index="list.report.recverror">Failure with receiving network data.</label>
<label index="list.msg.ok">Ok</label>
<label index="list.msg.lastRun">%1$s %2$s</label>
<label index="list.no.broken.links.title">No broken links to show!</label>
    (1-1/1)