From 86939d83bdf836d4765f9006eb5af362e8efbfce Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 22 Nov 2007 22:02:35 +0000 Subject: [PATCH] fixed removeColumn() --- lib/Doctrine/Table.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 1e79a54fc..7d3846b46 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -1488,12 +1488,17 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable * * @return boolean */ - public function removeColumn($columnName) + public function removeColumn($fieldName) { + $columnName = array_search($fieldName, $this->_fieldNames); + + unset($this->_fieldNames[$columnName]); + if (isset($this->_columns[$columnName])) { unset($this->_columns[$columnName]); return true; } + $this->columnCount--; return false; }