Use serialize()/unserialize() instead of json_encode()/json_decode()
This commit is contained in:
parent
32a97638e7
commit
3b45cf8d99
|
@ -1362,8 +1362,8 @@ class tx_dlf_document {
|
|||
'author' => implode('; ', $metadata['author']),
|
||||
'year' => implode('; ', $metadata['year']),
|
||||
'place' => implode('; ', $metadata['place']),
|
||||
'metadata' => json_encode($listed),
|
||||
'metadata_sorting' => json_encode($sortable),
|
||||
'metadata' => serialize($listed),
|
||||
'metadata_sorting' => serialize($sortable),
|
||||
'structure' => $metadata['type'][0],
|
||||
'partof' => $partof,
|
||||
'volume' => $metadata['volume'][0],
|
||||
|
|
|
@ -286,7 +286,7 @@ class tx_dlf_collection extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata.
|
||||
$metadata = json_decode($resArray['metadata'], TRUE);
|
||||
$metadata = unserialize($resArray['metadata']);
|
||||
|
||||
if (!empty($metadata['type'][0]) && t3lib_div::testInt($metadata['type'][0])) {
|
||||
|
||||
|
@ -315,7 +315,7 @@ class tx_dlf_collection extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata for sorting.
|
||||
$sorting = json_decode($resArray['metadata_sorting'], TRUE);
|
||||
$sorting = unserialize($resArray['metadata_sorting']);
|
||||
|
||||
if (!empty($sorting['type']) && t3lib_div::testInt($sorting['type'])) {
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ class tx_dlf_search extends tx_dlf_plugin {
|
|||
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
|
||||
|
||||
// Prepare document's metadata.
|
||||
$metadata = json_decode($resArray['metadata'], TRUE);
|
||||
$metadata = unserialize($resArray['metadata']);
|
||||
|
||||
if (!empty($metadata['type'][0]) && t3lib_div::testInt($metadata['type'][0])) {
|
||||
|
||||
|
@ -349,7 +349,7 @@ class tx_dlf_search extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata for sorting.
|
||||
$sorting = json_decode($resArray['metadata_sorting'], TRUE);
|
||||
$sorting = unserialize($resArray['metadata_sorting']);
|
||||
|
||||
if (!empty($sorting['type']) && t3lib_div::testInt($sorting['type'])) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue