From ab95ab4a4b61173d1f0f583841712537a1fe7df6 Mon Sep 17 00:00:00 2001 From: alban Date: Wed, 26 Mar 2014 19:00:00 +0100 Subject: [PATCH] =?UTF-8?q?[fix]=C2=A0#1550=20Broken=20notice=20on=20multi?= =?UTF-8?q?=20user=20delete:=20only=20one=20reported?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bureau/admin/adm_dodel.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bureau/admin/adm_dodel.php b/bureau/admin/adm_dodel.php index 817b0ea3..3103ad31 100644 --- a/bureau/admin/adm_dodel.php +++ b/bureau/admin/adm_dodel.php @@ -42,26 +42,27 @@ getFields($fields); if($del_confirm == "y"){ - if (!is_array($d)) { - $d[]=$d; + if (!is_array($accountList)) { + $accountList[] = $accountList; } - reset($d); - while (list($key,$val)=each($d)) { + reset($accountList); + while (list($key,$val)=each($accountList)) { if (!$admin->checkcreator($val)) { __("This page is restricted to authorized staff"); exit(); } + $error = ""; if (!($u=$admin->get($val)) || !$admin->del_mem($val)) { - $error=sprintf(_("Member '%s' does not exist"),$val)."
"; + $error .= sprintf(_("Member '%s' does not exist"),$val)."
"; } else { - $error=sprintf(_("Member %s successfully deleted"),$u["login"])."
"; + $error .= sprintf(_("Member %s successfully deleted"),$u["login"])."
"; } } include("adm_list.php"); exit(); } else { - if (!is_array($d) || count($d)==0) { + if (!is_array($accountList) || count($accountList)==0) { $error=_("Please check the accounts you want to delete"); require("adm_list.php"); exit(); @@ -77,8 +78,8 @@ if($del_confirm == "y"){

get($userid); + foreach($accountList as $userid){ + $membre = $admin->get($userid); echo "".$membre['login']."
"; } ?>