From b31c449167fa027b21a0d99740f5223f3d697c75 Mon Sep 17 00:00:00 2001 From: phpnut Date: Mon, 19 Jun 2006 02:55:53 +0000 Subject: [PATCH] Added fix for Ticket #1016 Check box in edit view does not work. Model::column() was returning text instead of boolean for the column type git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3136 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_mysql.php | 4 +++- cake/libs/model/datasources/dbo/dbo_mysqli.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php index d4516afa1..c6a21b075 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/cake/libs/model/datasources/dbo/dbo_mysql.php @@ -395,7 +395,9 @@ class DboMysql extends DboSource { if (strpos($col, 'enum') !== false) { return "enum($limit)"; } - + if ($col == 'boolean') { + return $col; + } return 'text'; } /** diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index 6eb680e7a..4f87f86a5 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -388,7 +388,9 @@ class DboMysqli extends DboSource { if (strpos($col, 'enum') !== false) { return "enum($limit)"; } - + if ($col == 'boolean') { + return $col; + } return 'text'; } /**