From 0b92c1f2049379311c1d532cace04a46d634d4f4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 20 Nov 2009 15:10:00 +0000 Subject: [PATCH] backported r28437-9 --- admin/admin-cli.php | 2 +- .../class.admin_cmd_change_account_id.inc.php | 5 ++-- admin/templates/default/account_form_ldap.tpl | 29 +++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/admin/admin-cli.php b/admin/admin-cli.php index 6228846fbb..4c8e2b57f7 100755 --- a/admin/admin-cli.php +++ b/admin/admin-cli.php @@ -31,7 +31,7 @@ else // this is kind of a hack, as the autocreate_session_callback can not change the type of the loaded account-class // so we need to make sure the right one is loaded by setting the domain before the header gets included. $arg0s = explode(',',@array_shift($arguments)); -@list(,$_GET['domain']) = explode('@',$arg0s[0]); +@list(,$_REQUEST['domain']) = explode('@',$arg0s[0]); if (ini_get('session.save_handler') == 'files' && !is_writable(ini_get('session.save_path')) && is_dir('/tmp') && is_writable('/tmp')) { 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) diff --git a/admin/templates/default/account_form_ldap.tpl b/admin/templates/default/account_form_ldap.tpl index c43bb6f0e0..3970130928 100644 --- a/admin/templates/default/account_form_ldap.tpl +++ b/admin/templates/default/account_form_ldap.tpl @@ -1,6 +1,35 @@ {error_messages} +