mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
FEATURE: Added a SideReport to display all pages with broken page or file links.
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@88516 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
36cd236329
commit
b01f25daf7
@ -126,4 +126,27 @@ class SideReport_ToDo extends SideReport {
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
/**
|
||||
* Lists all pages with either broken page or file links.
|
||||
*
|
||||
* @package cms
|
||||
* @subpackage content
|
||||
*/
|
||||
class SideReport_BrokenLinks extends SideReport {
|
||||
|
||||
public function title() {
|
||||
return _t('SideReport.BROKENPAGEFILELINKS', 'Broken Page & File Links');
|
||||
}
|
||||
|
||||
public function records() {
|
||||
return DataObject::get('SiteTree', '"HasBrokenLink" = 1 OR "HasBrokenFile" = 1');
|
||||
}
|
||||
|
||||
public function fieldsToShow() {
|
||||
return array(
|
||||
'Title' => array('NestedTitle', array(2)),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user