Permalink
Browse files

Remove use of backticks in BrokenLinksReport, always use ANSI quotes

  • Loading branch information...
1 parent de4f207 commit 98197525c6b1b904aedfcd36a4627008587bb69d @halkyon halkyon committed Oct 11, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 code/reports/BrokenLinksReport.php
@@ -29,9 +29,8 @@ public function sourceRecords($params, $sort, $limit) {
$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) {

0 comments on commit 9819752

Please sign in to comment.