mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 04:41:41 +02:00
fixed not working change of comma-separated accounts, eg. info_responsible
This commit is contained in:
parent
51717e5dd9
commit
04a01fccb0
@ -252,14 +252,13 @@ class admin_cmd_change_account_id extends admin_cmd
|
|||||||
if (!$where) $where = array();
|
if (!$where) $where = array();
|
||||||
$where[] = "$column IS NOT NULL";
|
$where[] = "$column IS NOT NULL";
|
||||||
$where[] = "$column != ''";
|
$where[] = "$column != ''";
|
||||||
$db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__);
|
|
||||||
$change = array();
|
$change = array();
|
||||||
while(($row = $db->row(true)))
|
foreach($db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__) as $row)
|
||||||
{
|
{
|
||||||
$ids = explode(',',$old_ids=$row[$column]);
|
$ids = explode(',',$old_ids=$row[$column]);
|
||||||
foreach($ids as $key => $id)
|
foreach($ids as $key => $id)
|
||||||
{
|
{
|
||||||
if (isset($account_id2change[$id])) $ids[$key] = $account_id2change[$id];
|
if (isset($ids2change[$id])) $ids[$key] = $ids2change[$id];
|
||||||
}
|
}
|
||||||
$ids = implode(',',$ids);
|
$ids = implode(',',$ids);
|
||||||
if ($ids != $old_ids)
|
if ($ids != $old_ids)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user