Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
ab95ab4a
Commit
ab95ab4a
authored
Mar 26, 2014
by
alban
Browse files
[fix] #1550 Broken notice on multi user delete: only one reported
parent
83273520
Changes
1
Hide whitespace changes
Inline
Side-by-side
bureau/admin/adm_dodel.php
View file @
ab95ab4a
...
...
@@ -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
)
.
"<br />"
;
$error
.
=
sprintf
(
_
(
"Member '%s' does not exist"
),
$val
)
.
"<br />"
;
}
else
{
$error
=
sprintf
(
_
(
"Member %s successfully deleted"
),
$u
[
"login"
])
.
"<br />"
;
$error
.
=
sprintf
(
_
(
"Member %s successfully deleted"
),
$u
[
"login"
])
.
"<br />"
;
}
}
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"){
<p
class=
"alert alert-warning"
>
<?php
__
(
"WARNING : Confirm the deletion of the users"
);
?>
</p>
<p>
<?php
foreach
(
$
d
as
$userid
){
$membre
=
$admin
->
get
(
$userid
);
foreach
(
$
accountList
as
$userid
){
$membre
=
$admin
->
get
(
$userid
);
echo
"<input type=
\"
hidden
\"
name=
\"
d[]
\"
value=
\"
$userid
\"
/>"
.
$membre
[
'login'
]
.
"<br/>"
;
}
?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment