Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
0cb92930
Commit
0cb92930
authored
Jul 13, 2021
by
Markus Jylhänkangas
Browse files
Wrap _add_list_admin in transaction
parent
978001b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/List.pm
View file @
0cb92930
...
...
@@ -3424,11 +3424,19 @@ sub add_list_admin {
my
@users
=
@_
;
my
$total
=
0
;
my
$sdm
=
Sympa::
DatabaseManager
->
instance
;
$sdm
->
begin
;
foreach
my
$user
(
@users
)
{
$total
++
if
$self
->
_add_list_admin
(
$role
,
$user
);
}
$self
->
_cache_publish_expiry
('
admin_user
')
if
$total
;
my
$rc
=
$sdm
->
commit
;
unless
(
$rc
)
{
$log
->
syslog
('
err
',
'
Error at add admin commit: %s
',
$sdm
->
error
);
$sdm
->
rollback
;
}
return
$total
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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