BUGFIX: show in search filter not quoted for postgresql

This commit is contained in:
mstephens 2010-03-23 04:04:32 +00:00
parent e0222dc8b7
commit 8d99fa75f2

View File

@ -43,8 +43,9 @@ class GoogleSitemap extends Controller {
public function Items() { public function Items() {
$filter = ''; $filter = '';
$bt = defined('DB::USE_ANSI_SQL') ? "\"" : "`";
if(self::$use_show_in_search) { if(self::$use_show_in_search) {
$filter = 'ShowInSearch = 1'; $filter = "{$bt}ShowInSearch{$bt} = 1";
} }
$this->Pages = Versioned::get_by_stage('SiteTree', 'Live', $filter); $this->Pages = Versioned::get_by_stage('SiteTree', 'Live', $filter);