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
8743dc70
Verified
Commit
8743dc70
authored
Mar 03, 2020
by
Alexandre Morin
Browse files
fix (13412) : update json serializer
parent
0edf487c
Pipeline
#7144
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
core/Encoding/JsonSerializer.php
View file @
8743dc70
...
...
@@ -45,12 +45,11 @@ class JsonSerializer
}
if
(
is_object
(
$data
))
{
$return
=
clone
(
$data
);
foreach
(
$data
as
$key
=>
$value
)
{
$
return
->
{
$key
}
=
$this
->
getRefs
(
$value
);
$
data
->
{
$key
}
=
$this
->
getRefs
(
$value
);
}
return
$
return
;
return
$
data
;
}
if
(
is_resource
(
$data
))
{
...
...
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
8743dc70
...
...
@@ -554,7 +554,14 @@ trait archiveAccessTrait
$binaryDataObject
=
\
laabs
::
newInstance
(
"recordsManagement/BinaryDataObject"
);
$binaryDataObject
->
attachment
=
new
\
stdClass
();
if
(
\
laabs
::
isServiceClient
())
{
// Returns base64 encoded contents for web service clients
$binaryDataObject
->
attachment
->
data
=
\
core\Encoding\Base64
::
encode
(
$digitalResource
->
getHandler
());
}
else
{
// Let presenter stream the contents
$binaryDataObject
->
attachment
->
data
=
$digitalResource
->
getHandler
();
}
$binaryDataObject
->
attachment
->
uri
=
""
;
$binaryDataObject
->
attachment
->
filename
=
$digitalResource
->
fileName
;
...
...
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