Commit 61701765 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch 'cherry-pick-ea78784b' into '1.3-fixes'

Merge branch '5963-error-in-sinaps-workflow' into '1.3-fixes'

See merge request fusiondirectory/fd-plugins!782
parents 3c97f214 9ff89381
......@@ -183,7 +183,11 @@ class sinapsDiffusionHandlerJob
}
}
$values['supannAccount']['supannRefId'] = array_values(array_unique($values['supannAccount']['supannRefId']));
$message = 'User updated';
if ($values['lock']) {
$message = 'User deleted';
} else {
$message = 'User updated';
}
}
} else {
if ($values['lock']) {
......@@ -196,7 +200,12 @@ class sinapsDiffusionHandlerJob
if ($error !== TRUE) {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 15, strip_tags(implode(', ', $error))));
} else {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message, $idObjApp));
if ($values['lock']) {
/* $values['lock'] means this was a deletion, so we must not send an object identifier in the answer */
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message));
} else {
$this->sendAcquittementFonctionnel(sinapsRequest::acquittementFonctionnel(200, 0, $message, $idObjApp));
}
}
}
......
  • SonarQube analysis reported 3 issues

    • 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. This function "getAttributesInfo" has 175 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    2. This function "getUserValues" has 206 lines, which is greater than the 150 lines authorized. Split it into smaller functions. 📘
    3. Remove this unused "$class" local variable. 📘
Markdown is supported
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