Commit ec24bea0 authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Merge branch 'fix/17942_archiveId_search' into 'develop'

Fix/17942 archive id search

See merge request !716
parents 30eed01f 13a701bf
Pipeline #18112 failed with stages
in 36 seconds
......@@ -85,6 +85,10 @@ trait archiveAccessTrait
$checkAccess = true,
$maxResults = null
) {
if(is_null($originatorArchiveId)) {
$originatorArchiveId = $archiverArchiveId;
}
$accountController = \laabs::newController('auth/userAccount');
$accountController->isAuthorized('user');
......@@ -1035,6 +1039,11 @@ trait archiveAccessTrait
$queryParts['archiverArchiveId'] = "archiverArchiveId= :archiverArchiveId";
$queryParams['archiverArchiveId'] = $args['archiverArchiveId'];
}
if (!empty($args['originatorArchiveId']) && !empty($args['archiverArchiveId']) && $args['originatorArchiveId'] == $args['archiverArchiveId']) {
$queryParts['originatorArchiveId'] = "(archiveId= :archiveId OR originatorArchiveId= :originatorArchiveId OR archiverArchiveId= :archiverArchiveId)";
$queryParams['archiveId'] = $args['originatorArchiveId'];
unset($queryParts['archiverArchiveId']);
}
if (!empty($args['originatingDate'])) {
if (!empty($args['originatingDate'][0]) && is_string($args['originatingDate'][0])) {
$args['originatingDate'][0] = \laabs::newDate($args['originatingDate'][0]);
......
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