GetAssociatedResource(); $Field = $InvalidUrl->GetAssociatedField(); $Schema = new MetadataSchema(); $TitleField = $Schema->GetFieldByMappedName("Title"); # get the resource name and RFC anchor name $Name = preg_replace('/\s+/', " ", defaulthtmlentities(NeatlyTruncateString($Resource->Get($TitleField), 22), ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE)); $Title = preg_replace('/\s+/', " ", defaulthtmlentities($Resource->Get($TitleField), ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE)); $Url = preg_replace('/\s+/', " ", defaulthtmlentities($InvalidUrl->Url, ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE)); $FinalUrl = preg_replace('/\s+/', " ", defaulthtmlentities($InvalidUrl->FinalUrl, ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE)); $FieldName = preg_replace('/\s+/', " ", defaulthtmlentities($Field->Name(), ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE)); $StatusText = preg_replace('/\s+/', " ", $InvalidUrl->ReasonPhrase); $TitleWithSpaces = defaulthtmlentities($Resource->Get($TitleField), ENT_QUOTES, $SysConfig->DefaultCharacterSet(), FALSE); # basic url href sanitization (mainly to reject javascript) $UrlHref = "#"; if (preg_match("/^(mailto|ftps?|https?):\/\//", $InvalidUrl->Url)) { $UrlHref = $InvalidUrl->Url; } $FinalUrlHref = "#"; if (preg_match("/^(mailto|ftps?|https?):\/\//", $InvalidUrl->FinalUrl)) { $FinalUrlHref = $InvalidUrl->FinalUrl; } $CodeString = strval($InvalidUrl->StatusCode); # construct a search query string $Search = $Resource->Get($TitleField); # add the publisher value if the field exists $Publisher = $Schema->GetFieldByName("Publisher"); if (!is_null($Publisher) && $Publisher->Status() == MetadataSchema::MDFSTAT_OK && $Publisher->Type() == MetadataSchema::MDFTYPE_CONTROLLEDNAME) { foreach ($Resource->Get($Publisher) as $PublisherName) { $Search .= " ".$PublisherName; } } $Search = urlencode($Search); # determine if we should display the release/withhold buttons if ($AF->SignalEvent("URLCHECKER_USING_CUSTOM_RELEASE_CALLBACKS")) { $DisplayReleaseActions = TRUE; } else if (NULL !== ($ReleaseFlag = $Schema->GetFieldByName("Release Flag")) && $ReleaseFlag->Status() == MetadataSchema::MDFSTAT_OK && $ReleaseFlag->Enabled()) { $DisplayReleaseActions = TRUE; } else { $DisplayReleaseActions = FALSE; } ?> StatusCode); ?> 1) { ?> FinalStatusCode == 200) { ?> [Redirect Page] Edit SignalEvent("URLCHECKER_IS_RESOURCE_RELEASED", array($Resource))) { ?> Withold Release FinalStatusCode == 200 && !$InvalidUrl->IsFinalUrlInvalid) { ?> Auto-fix Auto-fix Check Search Report ".$StatusCode." (".$Count.")"; } ?> GUIFile("UrlChecker.css"))) { ?> " media="all" /> GUIFile("UrlChecker.js"))) { ?> Hidden URLs
style="visibility: hidden;">
" />
1) { ?> 1) { ?>
Type Field Resource Title URL Actions
(no invalid URLs to display)
(no invalid URLs to display)
1) { ?>