Verified Commit 75715470 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(sinaps) Fix acquisition when affectationPrincipal is an etablissement or is empty

issue #5912
Showing with 5 additions and 4 deletions
+5 -4
...@@ -81,9 +81,10 @@ class sinapsRequestAcquisition ...@@ -81,9 +81,10 @@ class sinapsRequestAcquisition
/* rattachements */ /* rattachements */
if (isset($user['supannEntiteAffectationPrincipale'])) { if (isset($user['supannEntiteAffectationPrincipale'])) {
$personne->rattachements->rattachement->identifiantStructureDeRattachement = $codeEntiteToldapUuidCallback($user['supannEntiteAffectationPrincipale']); $personne->rattachements->rattachement->identifiantStructureDeRattachement = $codeEntiteToldapUuidCallback($user['supannEntiteAffectationPrincipale']);
$personne->rattachements->rattachement->roles->role->typeRole = 'EXT';
$personne->rattachements->rattachement->roles->role->externe->typeExterne = $typeExterne;
} }
$personne->rattachements->rattachement->roles->role->typeRole = 'EXT';
$personne->rattachements->rattachement->roles->role->externe->typeExterne = $typeExterne;
} }
public function getXML() public function getXML()
......
...@@ -73,8 +73,8 @@ class sinapsUser extends simplePlugin ...@@ -73,8 +73,8 @@ class sinapsUser extends simplePlugin
* This is done here to make sure sinapsRequestAcquisition does not perform LDAP searches by itself * This is done here to make sure sinapsRequestAcquisition does not perform LDAP searches by itself
* */ * */
$entites = objects::ls( $entites = objects::ls(
'entite', array('entite','etablissement'),
array('supannRefId' => '*', 'supannTypeEntite' => 1, 'dn' => 'raw'), array('supannRefId' => '*', 'dn' => 'raw'),
NULL, NULL,
'(supannCodeEntite='.$codeEntite.')' '(supannCodeEntite='.$codeEntite.')'
); );
......
  • SonarQube analysis reported 3 issues

    • :warning: 3 major

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. :warning: This function "getUserValues" has 198 lines, which is greater than the 150 lines authorized. Split it into smaller functions. :blue_book:
    2. :warning: Remove this unused "$class" local variable. :blue_book:
    3. :warning: Review the data-flow - use of uninitialized value. :blue_book:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment