mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR make site checking clearer on broken links report (from r96456)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98195 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1215f6f1f5
commit
8ab939ca16
@ -11,7 +11,7 @@ class BrokenLinksReport extends SSReport {
|
|||||||
return _t('BrokenLinksReport.BROKENLINKS',"Broken links report");
|
return _t('BrokenLinksReport.BROKENLINKS',"Broken links report");
|
||||||
}
|
}
|
||||||
function sourceRecords($params = null) {
|
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)");
|
else $ret = DataObject::get('SiteTree', "(HasBrokenFile = 1 OR HasBrokenLink = 1)");
|
||||||
|
|
||||||
$returnSet = new DataObjectSet();
|
$returnSet = new DataObjectSet();
|
||||||
@ -59,7 +59,7 @@ class BrokenLinksReport extends SSReport {
|
|||||||
'formatting' => '<a href=\"admin/show/$ID\" title=\"Edit page\">$value</a>'
|
'formatting' => '<a href=\"admin/show/$ID\" title=\"Edit page\">$value</a>'
|
||||||
),
|
),
|
||||||
"LastEdited" => array(
|
"LastEdited" => array(
|
||||||
"title" => "Date ".(isset($_REQUEST['OnLive'])?'published':'last modified'),
|
"title" => "Date ".(isset($_REQUEST['CheckSite']) && ($_REQUEST['CheckSite'] == 'Draft')?'last modified':'published'),
|
||||||
'casting' => 'SSDatetime->Full'
|
'casting' => 'SSDatetime->Full'
|
||||||
),
|
),
|
||||||
"BrokenReason" => array(
|
"BrokenReason" => array(
|
||||||
@ -75,7 +75,10 @@ class BrokenLinksReport extends SSReport {
|
|||||||
}
|
}
|
||||||
function parameterFields() {
|
function parameterFields() {
|
||||||
return new FieldSet(
|
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(
|
new DropdownField('Reason', 'Problem to check', array(
|
||||||
'' => 'Any',
|
'' => 'Any',
|
||||||
'BROKENFILE' => 'Broken file',
|
'BROKENFILE' => 'Broken file',
|
||||||
|
Loading…
Reference in New Issue
Block a user