mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR typo fixes, adding missing columns (from r96433)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98193 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4982aac955
commit
1215f6f1f5
@ -8,7 +8,7 @@
|
||||
|
||||
class BrokenLinksReport extends SSReport {
|
||||
function title() {
|
||||
return _t('BrokenLinksReport.BROKENLINKS',"Pages with broken links");
|
||||
return _t('BrokenLinksReport.BROKENLINKS',"Broken links report");
|
||||
}
|
||||
function sourceRecords($params = null) {
|
||||
if (isset($_REQUEST['OnLive'])) $ret = Versioned::get_by_stage('SiteTree', 'Live', "(HasBrokenLink = 1 OR HasBrokenFile = 1)");
|
||||
@ -22,12 +22,12 @@ class BrokenLinksReport extends SSReport {
|
||||
|
||||
if ($isVirtualPage) {
|
||||
if ($record->HasBrokenLink) {
|
||||
$reason = "virtual page pointing to non-existant page";
|
||||
$reason = "virtual page pointing to non-existent page";
|
||||
$reasonCodes = array("VPBROKENLINK");
|
||||
}
|
||||
} else if ($isRedirectorPage) {
|
||||
if ($record->HasBrokenLink) {
|
||||
$reason = "redirector page pointing to non-existant page";
|
||||
$reason = "redirector page pointing to non-existent page";
|
||||
$reasonCodes = array("RPBROKENLINK");
|
||||
}
|
||||
} else {
|
||||
@ -44,7 +44,7 @@ class BrokenLinksReport extends SSReport {
|
||||
}
|
||||
|
||||
if ($reason) {
|
||||
if ($params['Reason'] && !in_array($params['Reason'], $reasonCodes)) continue;
|
||||
if (isset($params['Reason']) && $params['Reason'] && !in_array($params['Reason'], $reasonCodes)) continue;
|
||||
$record->BrokenReason = $reason;
|
||||
$returnSet->push($record);
|
||||
}
|
||||
@ -58,11 +58,15 @@ class BrokenLinksReport extends SSReport {
|
||||
"title" => "Title",
|
||||
'formatting' => '<a href=\"admin/show/$ID\" title=\"Edit page\">$value</a>'
|
||||
),
|
||||
"LastEdited" => array(
|
||||
"title" => "Date ".(isset($_REQUEST['OnLive'])?'published':'last modified'),
|
||||
'casting' => 'SSDatetime->Full'
|
||||
),
|
||||
"BrokenReason" => array(
|
||||
"title" => "Reason"
|
||||
"title" => "Problem type"
|
||||
),
|
||||
'AbsoluteLink' => array(
|
||||
'title' => 'Links',
|
||||
'title' => 'URL',
|
||||
'formatting' => '$value " . ($AbsoluteLiveLink ? "<a href=\"$AbsoluteLiveLink\">(live)</a>" : "") . " <a href=\"$value?stage=Stage\">(draft)</a>'
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user