fixed removeColumn()
This commit is contained in:
parent
fbd4e86912
commit
86939d83bd
@ -1488,12 +1488,17 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
|
|||||||
*
|
*
|
||||||
* @return boolean
|
* @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])) {
|
if (isset($this->_columns[$columnName])) {
|
||||||
unset($this->_columns[$columnName]);
|
unset($this->_columns[$columnName]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
$this->columnCount--;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user