Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fd-plugins
Commits
4ecf6baf
Unverified
Commit
4ecf6baf
authored
May 09, 2019
by
Côme Chilliet
Browse files
🚑
fix(sinaps) Respect quotite tag in affectations
issue #5918
parent
e36d23d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
sinaps/include/class_sinapsRequest.inc
View file @
4ecf6baf
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2017-201
8
FusionDirectory
Copyright (C) 2017-201
9
FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -361,18 +361,23 @@ class sinapsRequest
continue
;
}
if
(
isset
(
$role
->
personneRessource
->
affectations
->
affectation
))
{
$quotiteMax
=
NULL
;
foreach
(
$role
->
personneRessource
->
affectations
->
affectation
as
$affectation
)
{
if
(
!
$this
->
checkValidite
(
$affectation
,
$now
))
{
continue
;
}
$UUID
=
$this
->
getUUIDFromReferenceCroisee
(
$identifiantApplication
,
$affectation
->
referenceCroisee
);
$quotite
=
(
isset
(
$affectation
->
quotite
)
?
(
int
)
$affectation
->
quotite
:
0
);
if
(
!
empty
(
$UUID
))
{
$entite
=
$ldapUuidToCodeEntiteCallback
(
$UUID
);
if
(
isset
(
$entite
[
'supannTypeEntite'
]))
{
$values
[
'supannAccount'
][
'supannTypeEntiteAffectation'
][]
=
$entite
[
'supannTypeEntite'
];
}
$values
[
'supannAccount'
][
'supannEntiteAffectation'
][]
=
$entite
[
'supannCodeEntite'
];
$values
[
'supannAccount'
][
'supannEntiteAffectationPrincipale'
]
=
$entite
[
'supannCodeEntite'
];
if
((
$quotiteMax
===
NULL
)
||
(
$quotite
>
$quotiteMax
))
{
$quotiteMax
=
$quotite
;
$values
[
'supannAccount'
][
'supannEntiteAffectationPrincipale'
]
=
$entite
[
'supannCodeEntite'
];
}
}
}
}
...
...
Git Mirror User
@gitmirror
mentioned in commit
f87f4205
·
May 09, 2019
mentioned in commit
f87f4205
mentioned in commit f87f42055fdc112dd3a9003a40799e9d51eee8ce
Toggle commit list
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