Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
ec24bea0
Commit
ec24bea0
authored
May 09, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
ec24bea0
...
...
@@ -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
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment