Skip to content

Commit

Permalink
Remove use of backticks in BrokenLinksReport, always use ANSI quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Harvey committed Oct 11, 2012
1 parent de4f207 commit 9819752
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/reports/BrokenLinksReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9819752

Please sign in to comment.