export ok à tester

This commit is contained in:
fredtempez 2021-02-18 14:01:44 +01:00
parent 74f0f60a8a
commit 3dcf8f1b96
1 changed files with 6 additions and 0 deletions

View File

@ -258,6 +258,8 @@ class addon extends common {
// Parcourir les pages utilisant le module // Parcourir les pages utilisant le module
foreach (array_keys($inPages,$this->getUrl(2)) as $pageId) { foreach (array_keys($inPages,$this->getUrl(2)) as $pageId) {
foreach ($infoModules[$this->getUrl(2)]['dataDirectory'] as $moduleId) { foreach ($infoModules[$this->getUrl(2)]['dataDirectory'] as $moduleId) {
// Export des pages hébergeant le module
$pageContent[$pageId] = $this->getData(['page',$pageId]);
/** /**
* Données module.json ? * Données module.json ?
*/ */
@ -290,6 +292,10 @@ class addon extends common {
} }
} }
} }
// Enregistrement des pages
if (!file_exists($tmpFolder . '/fr/page.json')) {
file_put_contents($tmpFolder . '/fr/page.json', json_encode($pageContent));
}
// création du zip // création du zip
$fileName = $this->getUrl(2) . '.zip'; $fileName = $this->getUrl(2) . '.zip';
$this->makeZip ($fileName, $tmpFolder, []); $this->makeZip ($fileName, $tmpFolder, []);