From 04a01fccb088e0b69a09b05cdf0bc1b99b27ea2a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 20 Nov 2009 15:07:26 +0000 Subject: [PATCH] fixed not working change of comma-separated accounts, eg. info_responsible --- admin/inc/class.admin_cmd_change_account_id.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_cmd_change_account_id.inc.php b/admin/inc/class.admin_cmd_change_account_id.inc.php index 00e92f2a23..9fb8ad58c6 100644 --- a/admin/inc/class.admin_cmd_change_account_id.inc.php +++ b/admin/inc/class.admin_cmd_change_account_id.inc.php @@ -252,14 +252,13 @@ class admin_cmd_change_account_id extends admin_cmd if (!$where) $where = array(); $where[] = "$column IS NOT NULL"; $where[] = "$column != ''"; - $db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__); $change = array(); - while(($row = $db->row(true))) + foreach($db->select($table,'DISTINCT '.$column,$where,__LINE__,__FILE__) as $row) { $ids = explode(',',$old_ids=$row[$column]); 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); if ($ids != $old_ids)