mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Remove use of backticks in BrokenLinksReport, always use ANSI quotes
This commit is contained in:
parent
de4f207534
commit
98197525c6
@ -29,9 +29,8 @@ class BrokenLinksReport extends SS_Report {
|
||||
$sort = '';
|
||||
}
|
||||
}
|
||||
$q = DB::USE_ANSI_SQL ? '"' : '`';
|
||||
if (!isset($_REQUEST['CheckSite']) || $params['CheckSite'] == 'Published') $ret = Versioned::get_by_stage('SiteTree', 'Live', "({$q}SiteTree{$q}.{$q}HasBrokenLink{$q} = 1 OR {$q}SiteTree{$q}.{$q}HasBrokenFile{$q} = 1)", $sort, $join, $limit);
|
||||
else $ret = DataObject::get('SiteTree', "({$q}SiteTree{$q}.{$q}HasBrokenFile{$q} = 1 OR {$q}HasBrokenLink{$q} = 1)", $sort, $join, $limit);
|
||||
if (!isset($_REQUEST['CheckSite']) || $params['CheckSite'] == 'Published') $ret = Versioned::get_by_stage('SiteTree', 'Live', '("SiteTree"."HasBrokenLink" = 1 OR "SiteTree"."HasBrokenFile" = 1)', $sort, $join, $limit);
|
||||
else $ret = DataObject::get('SiteTree', '("SiteTree"."HasBrokenFile" = 1 OR "HasBrokenLink" = 1)', $sort, $join, $limit);
|
||||
|
||||
$returnSet = new ArrayList();
|
||||
if ($ret) foreach($ret as $record) {
|
||||
|
Loading…
Reference in New Issue
Block a user