Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
0ddff11b
Verified
Commit
0ddff11b
authored
Jun 04, 2018
by
Damien
Browse files
FIX #7809 Fix no reassign
parent
15217b33
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/group/models/GroupModelAbstract.php
View file @
0ddff11b
...
...
@@ -14,7 +14,6 @@
namespace
Group\models
;
use
Group\models\ServiceModel
;
use
Group\controllers\GroupController
;
use
SrcCore\models\DatabaseModel
;
use
SrcCore\models\ValidatorModel
;
...
...
@@ -345,14 +344,22 @@ class GroupModelAbstract
{
ValidatorModel
::
notEmpty
(
$aArgs
,
[
'groupId'
,
'newGroupId'
]);
ValidatorModel
::
stringType
(
$aArgs
,
[
'groupId'
,
'newGroupId'
]);
ValidatorModel
::
arrayType
(
$aArgs
,
[
'ignoredUsers'
]);
$where
=
[
'group_id = ?'
];
$data
=
[
$aArgs
[
'groupId'
]];
if
(
!
empty
(
$aArgs
[
'ignoredUsers'
]))
{
$where
[]
=
'user_id NOT IN (?)'
;
$data
[]
=
$aArgs
[
'ignoredUsers'
];
}
DatabaseModel
::
update
([
'table'
=>
'usergroup_content'
,
'set'
=>
[
'group_id'
=>
$aArgs
[
'newGroupId'
]
],
'where'
=>
[
'group_id = ?'
,
'user_id NOT IN (?)'
]
,
'data'
=>
[
$aArgs
[
'groupId'
],
$aArgs
[
'ignoredUsers'
]]
'where'
=>
$where
,
'data'
=>
$data
]);
return
true
;
...
...
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