mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
fixed update problem of wiki, RenameColumn could not deal with column-names in mixed case
This commit is contained in:
parent
60ae406c63
commit
d9ba5f9ab8
@ -316,8 +316,24 @@
|
||||
function RenameColumn($sTableName, $sOldColumnName, $sNewColumnName, $bCopyData=True)
|
||||
{
|
||||
$table_def = $this->GetTableDefinition($sTableName);
|
||||
|
||||
if (isset($table_def['fd'][$sOldColumnName]))
|
||||
{
|
||||
$old_def = $table_def['fd'][$sOldColumnName];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($table_def['fd'] as $col => $def)
|
||||
{
|
||||
if (strlower($col) == strtolower($OldColumnName))
|
||||
{
|
||||
$old_def = $def;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$col_def = $this->_egw2adodb_columndef(array(
|
||||
'fd' => array($sNewColumnName => $table_def['fd'][strtolower($sOldColumnName)]),
|
||||
'fd' => array($sNewColumnName => $old_def),
|
||||
'pk' => array(),
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user