forked from ZwiiCMS-Team/ZwiiCMS
import du thème manque reload
This commit is contained in:
parent
e980754893
commit
176ff461d4
@ -452,11 +452,11 @@ class theme extends common {
|
|||||||
|
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
if ($zip->open('site/file/source/'.$zipFilename) === TRUE) {
|
if ($zip->open('site/file/source/'.$zipFilename) === TRUE) {
|
||||||
unlink('site/data/theme.json');
|
|
||||||
$zip->extractTo('.');
|
$zip->extractTo('.');
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
file_put_contents('site/data/custom.css', file_get_contents('core/module/theme/resource/custom.css'));
|
||||||
// Import du thème
|
// Import du thème
|
||||||
$this->readData();
|
die();
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => 'Le thème <b>'.$zipFilename.'</b> a été importé',
|
'notification' => 'Le thème <b>'.$zipFilename.'</b> a été importé',
|
||||||
@ -489,6 +489,8 @@ class theme extends common {
|
|||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
if ($zip->open('site/tmp/' . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) {
|
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.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']) !== '' ) {
|
if ($this->getData(['theme','body','image']) !== '' ) {
|
||||||
$zip->addFile('site/file/source/'.$this->getData(['theme','body','image']),
|
$zip->addFile('site/file/source/'.$this->getData(['theme','body','image']),
|
||||||
'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();
|
$zip = new ZipArchive();
|
||||||
if ($zip->open('site/tmp/' . $zipFilename, ZipArchive::CREATE | ZipArchive::OVERWRITE ) === TRUE) {
|
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.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']) !== '' ) {
|
if ($this->getData(['theme','body','image']) !== '' ) {
|
||||||
$zip->addFile('site/file/source/'.$this->getData(['theme','body','image']),
|
$zip->addFile('site/file/source/'.$this->getData(['theme','body','image']),
|
||||||
'site/file/source/'.$this->getData(['theme','body','image'])
|
'site/file/source/'.$this->getData(['theme','body','image'])
|
||||||
|
Loading…
Reference in New Issue
Block a user