From 176ff461d4de3b8e088aa4c3a2ae735e3ce873df Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 30 Dec 2018 00:27:23 +0100 Subject: [PATCH] =?UTF-8?q?import=20du=20th=C3=A8me=20manque=20reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 2fe28aa2..24b4ec9a 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -452,11 +452,11 @@ class theme extends common { $zip = new ZipArchive(); if ($zip->open('site/file/source/'.$zipFilename) === TRUE) { - unlink('site/data/theme.json'); $zip->extractTo('.'); $zip->close(); + file_put_contents('site/data/custom.css', file_get_contents('core/module/theme/resource/custom.css')); // Import du thème - $this->readData(); + die(); // Valeurs en sortie $this->addOutput([ 'notification' => 'Le thème '.$zipFilename.' a été importé', @@ -489,6 +489,8 @@ class theme extends common { $zip = new ZipArchive(); if ($zip->open('site/tmp/' . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) { $zip->addFile('site/data/theme.json','site/data/theme.json'); + $zip->addFile('site/data/theme.json','site/data/theme.css'); + $zip->addFile('site/data/theme.json','site/data/custom.css'); if ($this->getData(['theme','body','image']) !== '' ) { $zip->addFile('site/file/source/'.$this->getData(['theme','body','image']), 'site/file/source/'.$this->getData(['theme','body','image']) @@ -525,6 +527,8 @@ class theme extends common { $zip = new ZipArchive(); if ($zip->open('site/tmp/' . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) { $zip->addFile('site/data/theme.json','site/data/theme.json'); + $zip->addFile('site/data/theme.json','site/data/theme.css'); + $zip->addFile('site/data/theme.json','site/data/custom.css'); if ($this->getData(['theme','body','image']) !== '' ) { $zip->addFile('site/file/source/'.$this->getData(['theme','body','image']), 'site/file/source/'.$this->getData(['theme','body','image'])