From 388d474870490a0cae58f02458f9ef3b4986aef0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 28 May 2010 02:30:27 +0000 Subject: [PATCH] MINOR make site checking clearer on broken links report (from r96456) (from r98195) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@105839 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/reports/BrokenLinksReport.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/reports/BrokenLinksReport.php b/code/reports/BrokenLinksReport.php index ae7bfcb4..a9e4c645 100644 --- a/code/reports/BrokenLinksReport.php +++ b/code/reports/BrokenLinksReport.php @@ -11,7 +11,7 @@ class BrokenLinksReport extends SS_Report { 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)"); + if (!isset($_REQUEST['CheckSite']) || $params['CheckSite'] == 'Published') $ret = Versioned::get_by_stage('SiteTree', 'Live', "(HasBrokenLink = 1 OR HasBrokenFile = 1)"); else $ret = DataObject::get('SiteTree', "(HasBrokenFile = 1 OR HasBrokenLink = 1)"); $returnSet = new DataObjectSet(); @@ -59,7 +59,7 @@ class BrokenLinksReport extends SS_Report { 'formatting' => '$value' ), "LastEdited" => array( - "title" => "Date ".(isset($_REQUEST['OnLive'])?'published':'last modified'), + "title" => "Date ".(isset($_REQUEST['CheckSite']) && ($_REQUEST['CheckSite'] == 'Draft')?'last modified':'published'), 'casting' => 'SSDatetime->Full' ), "BrokenReason" => array( @@ -75,7 +75,10 @@ class BrokenLinksReport extends SS_Report { } function parameterFields() { return new FieldSet( - new CheckboxField('OnLive', 'Check live site'), + new DropdownField('CheckSite', 'Check site', array( + 'Published' => 'Published Site', + 'Draft' => 'Draft Site' + )), new DropdownField('Reason', 'Problem to check', array( '' => 'Any', 'BROKENFILE' => 'Broken file',