forked from ZwiiCMS-Team/ZwiiCMS
Import theme ok
This commit is contained in:
parent
2697788377
commit
c4b1274187
@ -26,7 +26,6 @@ class theme extends common {
|
||||
'site' => self::GROUP_ADMIN,
|
||||
'manage' => self::GROUP_ADMIN,
|
||||
'export' => self::GROUP_ADMIN,
|
||||
'import' => self::GROUP_ADMIN,
|
||||
'save' => self::GROUP_ADMIN
|
||||
];
|
||||
public static $aligns = [
|
||||
@ -450,12 +449,18 @@ class theme extends common {
|
||||
public function manage() {
|
||||
if($this->isPost() ) {
|
||||
$zipFilename = $this->getInput('themeManageImport', helper::FILTER_STRING_SHORT, true);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($zipFilename) === TRUE) {
|
||||
echo $zip->extractTo('site/');
|
||||
die();
|
||||
if ($zip->open('site/file/source/'.$zipFilename) === TRUE) {
|
||||
$zip->extractTo('.');
|
||||
$zip->close();
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => 'Archive <b>'.$zipFilename.'</b> sauvegardée dans fichiers',
|
||||
'redirect' => helper::baseUrl() . 'theme',
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -534,14 +539,4 @@ class theme extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import du thème
|
||||
*/
|
||||
public function import() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user