MINOR FIX: Column names quoted properly

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85419 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2009-08-31 00:22:10 +00:00
parent 95e50bd78f
commit a1207e4b94

View File

@ -57,7 +57,7 @@ class RootURLController extends Controller {
$host = str_replace('www.','',$host);
$SQL_host = Convert::raw2sql($host);
$homePageOBJs = DataObject::get("SiteTree", "HomepageForDomain LIKE '%$SQL_host%'");
$homePageOBJs = DataObject::get("SiteTree", "\"HomepageForDomain\" LIKE '%$SQL_host%'");
if($homePageOBJs) foreach($homePageOBJs as $candidateObj) {
if(preg_match('/(,|^) *' . preg_quote($host) . ' *(,|$)/', $candidateObj->HomepageForDomain)) {
$homePageOBJ = $candidateObj;