Skip to content

Commit a326087

Browse files
Fix issue with YunohostCLIAppImporter list creation
1 parent e824818 commit a326087

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

services/YunohostCLIAppImporter.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public function __construct(
6262
]
6363
];
6464

65-
$this->databaseLists = [
66-
'ListeVisibilite' => [
67-
"titre_liste" => "Visibilité",
68-
"label" => [
69-
"pub" => "Publique",
70-
"priv" => "Privée"
71-
]
65+
$this->databaseLists =[
66+
[
67+
"title" => "Visibilité",
68+
"nodes" => [
69+
[ "id" => "pub", "label" => "Publique", "children" => [] ],
70+
[ "id" => "priv", "label" => "Privée", "children" => [] ],
71+
],
7272
]
7373
];
7474
}
@@ -167,9 +167,9 @@ public function syncFormModel()
167167
$liste = $this->listManager->getOne($tag);
168168
if (empty($liste)) {
169169
// TODO : comment etre sur de l'id ?
170-
$this->listManager->create($list['titre_liste'], $list['label']);
170+
$this->listManager->create($list['title'], $list['nodes']);
171171
} else {
172-
echo 'La liste "' . $list['titre_liste'] . '" existe deja.' . "\n";
172+
echo 'La liste "' . $list['title'] . '" existe deja.' . "\n";
173173
// test if compatible
174174
}
175175
}

0 commit comments

Comments
 (0)