mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR improved wording on reports (from r96258)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98189 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
dee3b20ccd
commit
5e8fc6c920
@ -11,12 +11,8 @@ class BrokenLinksReport extends SSReport {
|
||||
return _t('BrokenLinksReport.BROKENLINKS',"Pages with broken links");
|
||||
}
|
||||
function sourceRecords($params = null) {
|
||||
// Get class names for page types that are not virtual pages or redirector pages
|
||||
$classes = array_diff(ClassInfo::subclassesFor('SiteTree'), ClassInfo::subclassesFor('VirtualPage'), ClassInfo::subclassesFor('RedirectorPage'));
|
||||
$classNames = "'".join("','", $classes)."'";
|
||||
|
||||
if (isset($_REQUEST['OnLive'])) $ret = Versioned::get_by_stage('SiteTree', 'Live', "ClassName IN ($classNames) AND (HasBrokenLink = 1 OR HasBrokenFile = 1)");
|
||||
else $ret = DataObject::get('SiteTree', "ClassName IN ($classNames) AND (HasBrokenFile = 1 OR HasBrokenLink = 1)");
|
||||
if (isset($_REQUEST['OnLive'])) $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();
|
||||
if ($ret) foreach($ret as $record) {
|
||||
@ -26,7 +22,7 @@ class BrokenLinksReport extends SSReport {
|
||||
|
||||
if ($isVirtualPage) {
|
||||
if ($record->HasBrokenLink) {
|
||||
$reason = "redirector page pointing to non-existant page";
|
||||
$reason = "virtual page pointing to non-existant page";
|
||||
$reasonCodes = array("VPBROKENLINK");
|
||||
}
|
||||
} else if ($isRedirectorPage) {
|
||||
|
Loading…
Reference in New Issue
Block a user