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
66ce90ee
Commit
66ce90ee
authored
Apr 21, 2022
by
Arnaud Pauget
Browse files
fix(17942) : add search on archiveId archiverArchiveId and originatorArchiveId with only one field
parent
1117f5ae
Pipeline
#17614
failed with stages
in 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
66ce90ee
...
...
@@ -85,6 +85,12 @@ trait archiveAccessTrait
$checkAccess
=
true
,
$maxResults
=
null
)
{
if
(
is_null
(
$originatorArchiveId
))
{
$originatorArchiveId
=
$archiverArchiveId
;
}
// var_dump($originatorArchiveId);
// var_dump($archiverArchiveId);
// exit;
$accountController
=
\
laabs
::
newController
(
'auth/userAccount'
);
$accountController
->
isAuthorized
(
'user'
);
...
...
@@ -1035,6 +1041,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