From 7a18cd8bec2c1b3e14030f9a3ea9c861c3043dc1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 19 May 2009 01:58:29 +0000 Subject: [PATCH] BUGFIX Fixed quoting in Money git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77132 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/fieldtypes/Money.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/model/fieldtypes/Money.php b/core/model/fieldtypes/Money.php index a75a8dab1..1428c77d0 100644 --- a/core/model/fieldtypes/Money.php +++ b/core/model/fieldtypes/Money.php @@ -7,7 +7,6 @@ * @version $Id: Currency.php 6137 2007-08-19 14:55:27Z shreef $ */ -set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH . '/sapphire/thirdparty'); require_once 'Zend/Currency.php'; /** @@ -88,8 +87,8 @@ class Money extends DBField implements CompositeDBField { function addToQuery(&$query) { parent::addToQuery($query); - $query->select[] = $this->name . "Amount"; - $query->select[] = $this->name . "Currency"; + $query->select[] = sprintf('"%sAmount"', $this->name); + $query->select[] = sprintf('"%sCurrency"', $this->name); } function setValue($value,$record=null) {