From 1215f6f1f5aeeea13200b9e5390fb2e72e4f763f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 4 Feb 2010 04:53:22 +0000 Subject: [PATCH] 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 --- code/reports/BrokenLinksReport.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/reports/BrokenLinksReport.php b/code/reports/BrokenLinksReport.php index 04405b03..35b08bc7 100644 --- a/code/reports/BrokenLinksReport.php +++ b/code/reports/BrokenLinksReport.php @@ -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' => '$value' ), + "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 ? "(live)" : "") . " (draft)' ) );