You are here

function _linkchecker_is_internal_url in Link checker 7

Same name and namespace in other branches
  1. 6.2 includes/linkchecker.pages.inc \_linkchecker_is_internal_url()

Check if the link is an internal URL or not.

Parameters

object $link: Link object.

Return value

bool TRUE if link is internal, otherwise FALSE.

1 call to _linkchecker_is_internal_url()
_linkchecker_report_page in ./linkchecker.pages.inc
Builds the HTML report page table with pager.

File

./linkchecker.pages.inc, line 317
User page callbacks for the linkchecker module.

Code

function _linkchecker_is_internal_url(&$link) {
  global $base_url;
  if (strpos($link->url, $base_url) === 0) {
    $link->internal = trim(substr($link->url, strlen($base_url)), " \t\r\n\0\\/");
    return TRUE;
  }
}