Skip to content
Snippets Groups Projects
Commit 449cbff8 authored by Jared Hancock's avatar Jared Hancock
Browse files

team: Fix crash with bulk enalbe and disable

parent 4ec1602f
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,10 @@ if($_POST){
$num = Team::objects()->filter(array(
'team_id__in' => $_POST['ids']
))->update(array(
'isenabled' => 1
'flags' => SqlExpression::bitor(
new SqlField('flags'),
Team::FLAG_ENABLED
)
));
if ($num) {
......@@ -71,7 +74,10 @@ if($_POST){
$num = Team::objects()->filter(array(
'team_id__in' => $_POST['ids']
))->update(array(
'isenabled' => 0
'flags' => SqlExpression::bitand(
new SqlField('flags'),
~Team::FLAG_ENABLED
)
));
if ($num) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment