FIX: escape columns and tables for postgres

This commit is contained in:
Will Rossiter 2013-07-15 21:52:30 +12:00
parent 775eb66053
commit 55a5187f79
2 changed files with 2 additions and 5 deletions

View File

@ -130,8 +130,8 @@ class UserDefinedForm extends Page {
// attach every column to the print view from
$columns = SubmittedFormField::get()
->where("SubmittedForm.ParentID = '$this->ID'")
->leftJoin('SubmittedForm', 'SubmittedFormField.ParentID = SubmittedForm.ID')
->where("\"SubmittedForm\".\"ParentID\" = '$this->ID'")
->leftJoin('SubmittedForm', '"SubmittedFormField"."ParentID" = "SubmittedForm"."ID"')
->map('Name', 'Title');
$columns = $columns->toArray();

View File

@ -38,9 +38,6 @@ class UserDefinedFormTest extends FunctionalTest {
}
function testGetCMSFields() {
// ensure all the tabs are present.
// @todo a common bug with this is translations messing up the tabs.
// @todo only logic we should check for is that the tablelistfield filter
$this->logInWithPermission('ADMIN');
$form = $this->objFromFixture('UserDefinedForm', 'basic-form-page');