From 8500e3149ad119cb601153b357002ce79fe2a8aa Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 28 May 2010 02:30:17 +0000 Subject: [PATCH] MINOR typo fixes, adding missing columns (from r96433) (from r98193) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@105838 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 4b10386a..ae7bfcb4 100644 --- a/code/reports/BrokenLinksReport.php +++ b/code/reports/BrokenLinksReport.php @@ -8,7 +8,7 @@ class BrokenLinksReport extends SS_Report { 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 SS_Report { 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 SS_Report { } 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 SS_Report { "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)' ) );