BUG FIX: column names quoted properly

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100690 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2010-03-09 02:28:39 +00:00 committed by Sam Minnee
parent bcc6590799
commit 9ebabb1785
2 changed files with 3 additions and 3 deletions

View File

@ -2017,7 +2017,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
static function generate_homepage_domain_map() {
$domainSpecificHomepages = Versioned::get_by_stage('Page', 'Live', "HomepageForDomain != ''", 'URLSegment ASC');
$domainSpecificHomepages = Versioned::get_by_stage('Page', 'Live', "\"HomepageForDomain\" != ''", "\"URLSegment\" ASC");
if (!$domainSpecificHomepages) return false;
$map = array();

View File

@ -149,8 +149,8 @@ class VirtualPage extends Page {
&& Versioned::current_stage() == 'Live') {
$performCopyFrom = true;
$stageSourceVersion = DB::query("SELECT Version FROM SiteTree WHERE ID = $this->CopyContentFromID")->value();
$liveSourceVersion = DB::query("SELECT Version FROM SiteTree_Live WHERE ID = $this->CopyContentFromID")->value();
$stageSourceVersion = DB::query("SELECT \"Version\" FROM \"SiteTree\" WHERE \"ID\" = $this->CopyContentFromID")->value();
$liveSourceVersion = DB::query("SELECT \"Version\" FROM \"SiteTree_Live\" WHERE \"ID\" = $this->CopyContentFromID")->value();
// We're going to create a new VP record in SiteTree_versions because the published
// version might not exist, unless we're publishing the latest version