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:
Andrew Short 2009-10-11 00:08:06 +00:00 committed by Sam Minnee
parent 36cd236329
commit b01f25daf7

View File

@ -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)),
);
}
}