getString("DefaultCharacterSet"); $Resource = $InvalidUrl->getAssociatedResource(); $Field = $InvalidUrl->getAssociatedField(); $Schema = $Resource->getSchema(); $TitleField = $Schema->getFieldByMappedName("Title"); # get the resource name and RFC anchor name $Name = defaulthtmlentities( StdLib::NeatlyTruncateString($Resource->Get($TitleField), 22), ENT_QUOTES, $DefaultCharSet, false ); $Title = defaulthtmlentities( $Resource->get($TitleField), ENT_QUOTES, $DefaultCharSet, false ); $Url = defaulthtmlentities( $InvalidUrl->Url, ENT_QUOTES, $DefaultCharSet, false ); $FinalUrl = defaulthtmlentities( $InvalidUrl->FinalUrl, ENT_QUOTES, $DefaultCharSet, false ); $FieldName = defaulthtmlentities( $Field->GetDisplayName(), ENT_QUOTES, $DefaultCharSet, false ); $StatusText = $InvalidUrl->ReasonPhrase; $TitleWithSpaces = defaulthtmlentities( $Resource->get($TitleField), ENT_QUOTES, $DefaultCharSet, false ); # basic url href sanitization (mainly to reject javascript) $UrlHref = $InvalidUrl->Url; $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->fieldExists("Publisher") ? $Schema->getField("Publisher") : null; 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 $DisplayReleaseActions = ($Plugin->getConfigSetting("ReleaseConfiguration") !== null) ? true : false; $UrlId = $Plugin->encodeUrlIdentifier( $Resource->id(), $Field->id(), $InvalidUrl->Url ); ?> " >StatusCode) ?> 1) { ?> abbreviatedName() ?> userCanView(User::getAnonymousUser()) ? "Yes" : "No" ?> 65) { ?> FinalStatusCode == 200) { ?> [Redirect Page] Edit IsResourceReleased($Resource)) { ?> Withold Release FinalStatusCode == 200 && !$InvalidUrl->IsFinalUrlInvalid) { ?> Auto-fix Auto-fix Check Search Hidden == 0) { ?> Hide "All", ]; $InfoKey = ($H_Hidden ? "Hidden" : "")."SchemaIds"; foreach ($H_Info[$InfoKey] as $SchemaId) { $SchemaOptions[$SchemaId] = (new MetadataSchema($SchemaId))->name(); } $SchemaOptionList = new HtmlOptionList("SC", $SchemaOptions, $H_SchemaId); $SchemaOptionList->submitOnChange(true); $LimitOptions = [ 15 => "15", 25 => "25", 50 => "50", 100 => "100", ]; $LimitOptionList = new HtmlOptionList("N", $LimitOptions, $H_Limit); $LimitOptionList->submitOnChange(true); $OrderOptions = [ "Url" => "URL", "CheckDate" => "Date Checked", ]; if ($H_StatusCode == "All") { $OrderOptions += [ "StatusCode" => "Status", ]; } $OrderOptionList = new HtmlOptionList("SF", $OrderOptions, $H_OrderBy); $OrderOptionList->submitOnChange(true); $DirectionOptions = [ "ASC" => "Asc", "DESC" => "Desc", ]; $OrderDirectionOptionList = new HtmlOptionList("SD", $DirectionOptions, $H_OrderDirection); $OrderDirectionOptionList->submitOnChange(true); $StatusCodeOptions = [ "All" => 0, ]; $InfoKey = ($H_Hidden ? "Hidden" : "")."InvalidUrlsForStatusCodes"; foreach ($H_Info[$InfoKey] as $Key => $Count) { list($SchemaId, $StatusCode) = explode("-", $Key); if ($H_SchemaId == "All" || $H_SchemaId == $SchemaId) { $Category = statusCodeToCategory((int)$StatusCode); if (!isset($StatusCodeOptions[$Category])) { $StatusCodeOptions[$Category] = 0; } $StatusCodeOptions["All"] += $Count; $StatusCodeOptions[$Category] += $Count; } } foreach ($StatusCodeOptions as $Text => $Count) { $StatusCodeOptions[$Text] = $Text." (".$Count.")"; } $StatusCodeOptionList = new HtmlOptionList("S", $StatusCodeOptions, $H_StatusCode); $StatusCodeOptionList->submitOnChange(true); $NumCols = $H_NumUrlFields > 1 ? 7 : 6; # ----- DISPLAY -------------------------------------------------------------- ?>

URLs

0) { ?>
" /> getHtml(); ?> getHtml() ?> getHtml() ?> getHtml() ?> getHtml() ?>
1) { ?> 1) { ?>
Type Field Resource Pub URL Actions
display() ?>
(no invalid URLs to display)
(no invalid URLs to display)
0) { ?> 0) { ?> 0) { ?> 0) { ?> 0) { ?> 0) { ?>
Last Resource Checked Next Check Checked Resources Enqueued Resources Invalid URLs Possibly Invalid URLs