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] isResourceReleased($Resource)) { ?> FinalStatusCode == 200 && !$InvalidUrl->IsFinalUrlInvalid) { ?> Hidden == 0) { ?>
"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) { ?>
" /> Results Per Page: getHtml(); ?> Schema: getHtml() ?> Sort By: getHtml() ?> getHtml() ?> Status: getHtml() ?>

Type 1) { ?> | Field | Resource |  | Pub | URL | Actions
--- | --- | --- | --- | --- | --- | ---
display() ?>
1) { ?>
(no invalid URLs to display)
(no invalid URLs to display)

Last Resource Checked | Next Check 0) { ?> | Checked Resources | Enqueued Resources 0) { ?> | Invalid URLs 0) { ?> | Possibly Invalid URLs
--- | --- | --- | --- | --- | ---
| 0) { ?> |  | 0) { ?> | 0) { ?> |