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
0edf487c
Verified
Commit
0edf487c
authored
Mar 03, 2020
by
Alexandre Morin
Browse files
fix (13412) : update json serializer
parent
2a9ea3fd
Pipeline
#7138
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
core/Encoding/json.php
View file @
0edf487c
...
@@ -78,10 +78,10 @@ class json
...
@@ -78,10 +78,10 @@ class json
public
static
function
encode
(
$data
)
public
static
function
encode
(
$data
)
{
{
require_once
__DIR__
.
'/JsonSerializer.php'
;
require_once
__DIR__
.
'/JsonSerializer.php'
;
$serializer
=
new
JsonSerializer
();
$serializer
=
new
\
JsonSerializer
();
//$jsonString = \json_encode($data, \JSON_PRETTY_PRINT + \JSON_UNESCAPED_SLASHES + \JSON_UNESCAPED_UNICODE);
//$jsonString = \json_encode($data, \JSON_PRETTY_PRINT + \JSON_UNESCAPED_SLASHES + \JSON_UNESCAPED_UNICODE);
$jsonString
=
$serializer
(
$data
,
\
JSON_PRETTY_PRINT
+
\
JSON_UNESCAPED_SLASHES
+
\
JSON_UNESCAPED_UNICODE
);
$jsonString
=
$serializer
->
serialize
(
$data
,
\
JSON_PRETTY_PRINT
+
\
JSON_UNESCAPED_SLASHES
+
\
JSON_UNESCAPED_UNICODE
);
if
(
$jsonString
===
false
)
{
if
(
$jsonString
===
false
)
{
return
false
;
return
false
;
...
...
src/bundle/recordsManagement/Controller/archiveAccessTrait.php
View file @
0edf487c
...
@@ -554,14 +554,7 @@ trait archiveAccessTrait
...
@@ -554,14 +554,7 @@ trait archiveAccessTrait
$binaryDataObject
=
\
laabs
::
newInstance
(
"recordsManagement/BinaryDataObject"
);
$binaryDataObject
=
\
laabs
::
newInstance
(
"recordsManagement/BinaryDataObject"
);
$binaryDataObject
->
attachment
=
new
\
stdClass
();
$binaryDataObject
->
attachment
=
new
\
stdClass
();
if
(
\
laabs
::
isServiceClient
())
{
// Returns base64 encoded contents for web service clients
$binaryDataObject
->
attachment
->
data
=
base64_encode
(
$digitalResource
->
getContents
());
}
else
{
// Let presenter stream the contents
$binaryDataObject
->
attachment
->
data
=
$digitalResource
->
getHandler
();
$binaryDataObject
->
attachment
->
data
=
$digitalResource
->
getHandler
();
}
$binaryDataObject
->
attachment
->
uri
=
""
;
$binaryDataObject
->
attachment
->
uri
=
""
;
$binaryDataObject
->
attachment
->
filename
=
$digitalResource
->
fileName
;
$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