@@ 469-471 (lines=3) @@ | ||
466 | case '302': // Found (go recursive ?) |
|
467 | return $this->openURL($url, $location, $redirectCount + 1); |
|
468 | break; |
|
469 | case 400: // Bad Request |
|
470 | return array(false, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_ambiguous'].'<br />'.$httpStatusMsg, $code)); |
|
471 | break; |
|
472 | case 404: // Not found |
|
473 | return array(false, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_not_found'], $urlParts['host'])); |
|
474 | break; |
|
@@ 476-478 (lines=3) @@ | ||
473 | return array(false, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_not_found'], $urlParts['host'])); |
|
474 | break; |
|
475 | case '300': // Multiple choices |
|
476 | case '401': // Unauthorized (but it's there. right ?) |
|
477 | return array(true, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_ambiguous'], $code)); |
|
478 | break; |
|
479 | case '405': // Method Not Allowed |
|
480 | // TODO: Add a fallback to use GET method, otherwise this link should be marked as bad |
|
481 | return array(true, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_not_allowed'], $urlParts['host'], $allowVerbs)); |
|
@@ 483-485 (lines=3) @@ | ||
480 | // TODO: Add a fallback to use GET method, otherwise this link should be marked as bad |
|
481 | return array(true, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_not_allowed'], $urlParts['host'], $allowVerbs)); |
|
482 | break; |
|
483 | default: // All other statuses |
|
484 | return array(false, $redirectCount, sprintf($PMF_LANG['ad_linkcheck_openurl_ambiguous'], $code)); |
|
485 | break; |
|
486 | } |
|
487 | ||
488 | return array(false, $redirectCount, ''); |