Skip to content

Commit

Permalink
remove process query
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fink authored and Thomas Fink committed Aug 9, 2024
1 parent 99b1dba commit ed971d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
9 changes: 5 additions & 4 deletions zmsdb/src/Zmsdb/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,20 @@ public function readList($resolveReferences = 1, $limit = 300, $order = 'ASC')
public function readResolvedReferences(\BO\Zmsentities\Schema\Entity $mail, $resolveReferences)
{
$multiPart = $this->readMultiPartByQueueId($mail->id);

$mail->addMultiPart($multiPart);
if (1 <= $resolveReferences) {
$processQuery = new \BO\Zmsdb\Process();
$authData = $processQuery->readAuthKeyByProcessId($mail->process['id']);
$mail->process = $processQuery
->readEntity(
$mail->process['id'],
is_array($authData) ? $authData['authKey'] : null,
$resolveReferences - 1
$mail->process['id'],
resolveReferences: $resolveReferences - 1
);
$mail->department = (new \BO\Zmsdb\Department())
->readEntity($mail->department['id'], $resolveReferences - 1);

}

return $mail;
}

Expand Down

0 comments on commit ed971d6

Please sign in to comment.