diff --git a/src/app/history/controllers/HistoryController.php b/src/app/history/controllers/HistoryController.php index 41a2359600fec2c6806a91a0d51feee810fd5318..e329bb75e403d1a2016362f3665b2dc11f50d9d9 100644 --- a/src/app/history/controllers/HistoryController.php +++ b/src/app/history/controllers/HistoryController.php @@ -210,9 +210,7 @@ class HistoryController $objects = array_column($objects, 'title', 'id'); foreach ($filteredHistoryIds as $key => $objectId) { - if (!empty($key)) { - $history[$key]['label'] = $objects[$objectId]; - } + $history[$key]['label'] = $objects[$objectId]; } } } @@ -435,7 +433,7 @@ class HistoryController } $queryParams = $request->getQueryParams(); - if (!$queryParams['onlyProof'] || empty($proofDocument)) { + if (!empty($queryParams['onlyProof']) && (!$queryParams['onlyProof'] || empty($proofDocument))) { $formattedHistory = HistoryController::getFormattedHistory(['id' => $args['id']]); $historyXml = HistoryController::arrayToXml(['data' => $formattedHistory['formattedHistory'], 'xml' => false]); $historyXmlPath = $tmpPath . 'maarchProof' . $GLOBALS['id'] . "_" . rand() . '.xml'; @@ -489,8 +487,7 @@ class HistoryController } } } - - if (!$queryParams['onlyProof']) { + if (!empty($queryParams['onlyProof']) && !$queryParams['onlyProof']) { if ($workflowCompleted && ($queryParams['eSignDocument'] ?? $hasCertificate)) { $contentType = 'ESIGN'; }