MINOR: Fix unescaped table name

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69253 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2008-12-16 21:43:49 +00:00
parent eeeaa2603a
commit a1aeb7ff7e

View File

@ -33,9 +33,9 @@ class ModelAsController extends Controller implements NestedController {
if($this->urlParams['URLSegment']) {
$SQL_URLSegment = Convert::raw2sql($this->urlParams['URLSegment']);
if (Translatable::is_enabled()) {
$child = Translatable::get_one("SiteTree", "SiteTree.\"URLSegment\" = '$SQL_URLSegment'", false);
$child = Translatable::get_one("SiteTree", "\"SiteTree\".\"URLSegment\" = '$SQL_URLSegment'", false);
} else {
$child = DataObject::get_one("SiteTree", "SiteTree.\"URLSegment\" = '$SQL_URLSegment'", false);
$child = DataObject::get_one("SiteTree", "\"SiteTree\".\"URLSegment\" = '$SQL_URLSegment'", false);
}
if(!$child) {
if($child = $this->findOldPage($SQL_URLSegment)) {