Unverified Commit 13238990 authored by Jerome Boucher's avatar Jerome Boucher
Browse files

fix/14312 : add count with max results on register view

parent 4cbe2e3a
Pipeline #8801 failed with stage
......@@ -168,7 +168,7 @@ class log implements archiveDescriptionInterface
*/
public function count($description = null, $text = null, array $args = [], $checkAccess = null, $maxResults = null)
{
return count($this->search($description, $text, $args, $checkAccess, $maxResults = null);
return count($this->search($description, $text, $args, $checkAccess, $maxResults = null));
}
/**
......@@ -306,7 +306,7 @@ class log implements archiveDescriptionInterface
} else {
$query = "type='$type' AND ownerOrgRegNumber = null";
}
$journals = $this->sdoFactory->find('recordsManagement/log', $query, [], ">toDate", 0, 1);
if (empty($journals)) {
......@@ -412,7 +412,7 @@ class log implements archiveDescriptionInterface
// Create timestamp resource
$timestampResource = $digitalResourceController->createFromFile($timestampFileName);
$digitalResourceController->getHash($timestampResource, "SHA256");
$logMessage = ["message" => "Timestamp file generated"];
\laabs::notify(\bundle\audit\AUDIT_ENTRY_OUTPUT, $logMessage);
......
......@@ -85,9 +85,6 @@ interface archivesInterface
$maxResults = null
);
/*
RETRIEVE ARCHIVES
*/
/**
* Count archives by profile / dates / agreement
*
......
......@@ -115,11 +115,12 @@ class archive
/**
* get archives with information
* @param array $archives Array of archive object
* @param array $archives Array of archive object
* @param integer $count Count of archive object without limit
*
* @return string
*/
public function search($archives)
public function search($archives, $count)
{
$this->view->addContentFile("recordsManagement/archive/resultList.html");
......@@ -222,6 +223,7 @@ class archive
$this->view->setSource('hasReachMaxResults', $hasReachMaxResults);
$this->view->setSource('maxResults', \laabs::configuration('presentation.maarchRM')['maxResults']);
$this->view->setSource('totalResultsWithoutLimit', $count);
$this->view->setSource("accessRules", $accessRules);
$this->view->setSource("retentionRules", $retentionRules);
$this->view->setSource('archive', $archives);
......
......@@ -57,6 +57,7 @@ interface retrieveInterface
/**
* Search archives by profile / dates / agreement
*
* @param string $archiveId
* @param string $profileReference
* @param string $status
......@@ -69,8 +70,10 @@ interface retrieveInterface
* @param string $text
* @param integer $maxResults
*
* @return recordsManagement/archive/search
* @uses recordsManagement/archives/read
* @uses recordsManagement/archives/readCount
*
* @return recordsManagement/archive/search
*/
public function readRecordsmanagementArchives(
$archiveId = null,
......
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