mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
Fix #1007 : Upgrade from 3.5 may lose metadatas
This commit is contained in:
@@ -192,14 +192,14 @@ class Step35 implements DatasUpgraderInterface
|
|||||||
foreach ($datas as $meta_struct_id => $values) {
|
foreach ($datas as $meta_struct_id => $values) {
|
||||||
if (is_array($values)) {
|
if (is_array($values)) {
|
||||||
foreach ($values as $value) {
|
foreach ($values as $value) {
|
||||||
$metadatas[$meta_struct_id] = array(
|
$metadatas[] = array(
|
||||||
'meta_struct_id' => $meta_struct_id
|
'meta_struct_id' => $meta_struct_id
|
||||||
, 'meta_id' => null
|
, 'meta_id' => null
|
||||||
, 'value' => $value
|
, 'value' => $value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$metadatas[$meta_struct_id] = array(
|
$metadatas[] = array(
|
||||||
'meta_struct_id' => $meta_struct_id
|
'meta_struct_id' => $meta_struct_id
|
||||||
, 'meta_id' => null
|
, 'meta_id' => null
|
||||||
, 'value' => $values
|
, 'value' => $values
|
||||||
|
Reference in New Issue
Block a user