diff options
author | wei <> | 2007-04-14 05:02:29 +0000 |
---|---|---|
committer | wei <> | 2007-04-14 05:02:29 +0000 |
commit | 0f0d3c62e608287cdf77f1a3239371b521ecb40b (patch) | |
tree | bd91a9499a946e1667a0e17a9c5a97a9d695c7ce /framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php | |
parent | b05442bbe751b87998d8500ad8e6b28d652a35db (diff) |
Refactor ActiveRecordGateway to use TDataGatewayCommand
Diffstat (limited to 'framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php')
-rw-r--r-- | framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php index 89df0f2e..42f8cead 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php @@ -6,7 +6,8 @@ class TMysqlScaffoldInput extends TScaffoldInputCommon {
protected function createControl($container, $column, $record)
{
- switch(strtolower($column->getType()))
+ $dbtype = trim(str_replace(array('unsigned', 'zerofill'),array('','',),strtolower($column->getDbType())));
+ switch($dbtype)
{
case 'date':
return $this->createDateControl($container, $column, $record);
@@ -34,7 +35,8 @@ class TMysqlScaffoldInput extends TScaffoldInputCommon protected function getControlValue($container, $column, $record)
{
- switch(strtolower($column->getType()))
+ $dbtype = trim(str_replace(array('unsigned', 'zerofill'),array('','',),strtolower($column->getDbType())));
+ switch($dbtype)
{
case 'date':
return $container->findControl(self::DEFAULT_ID)->getDate();
@@ -57,7 +59,7 @@ class TMysqlScaffoldInput extends TScaffoldInputCommon protected function createIntegerControl($container, $column, $record)
{
- if($column->getLength()==1)
+ if($column->getColumnSize()==1)
return $this->createBooleanControl($container, $column, $record);
else
parent::createIntegerControl($container, $column, $record);
@@ -65,7 +67,7 @@ class TMysqlScaffoldInput extends TScaffoldInputCommon protected function getIntBooleanValue($container,$column, $record)
{
- if($column->getLength()==1)
+ if($column->getColumnSize()==1)
return (int)$container->findControl(self::DEFAULT_ID)->getChecked();
else
return $this->getDefaultControlValue($container,$column, $record);
|