Skip to content

Commit

Permalink
Merge pull request #2379 from LibreSign/backport/2378/stable28
Browse files Browse the repository at this point in the history
[stable28] Move logic to method
  • Loading branch information
vitormattos authored Feb 28, 2024
2 parents 6dff536 + c066c9f commit 1a719a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ private function getPages(): array {
*/
private function getVisibleElements(): array {
$return = [];
if (!$this->showVisibleElements) {
return $return;
}
try {
if (is_object($this->signRequest)) {
$visibleElements = $this->fileElementMapper->getByFileIdAndSignRequestId($this->file->getId(), $this->signRequest->getId());
Expand Down Expand Up @@ -380,9 +383,7 @@ private function getFile(): array {
if ($this->showSigners) {
$return['signers'] = $this->getSigners();
}
if ($this->showVisibleElements) {
$return['visibleElements'] = $this->getVisibleElements();
}
$return['visibleElements'] = $this->getVisibleElements();
ksort($return);
return $return;
}
Expand Down

0 comments on commit 1a719a0

Please sign in to comment.