diff --git a/CHANGES.md b/CHANGES.md index 24751797..4f42bef2 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,10 @@ - Gestion des thèmes : - Bouton de réinitialisation avec confirmation +## version 10.3.05 +- Correction : + - Thème : import d'un thème d'administration impossible. + ## version 10.3.04 - Corrections : - Warning lors d'une primo installation. diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index d62d7543..a1820966 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -635,7 +635,7 @@ class theme extends common { file_exists(self::TEMP_DIR . $tempFolder . '/site/data/admin.json') AND file_exists(self::TEMP_DIR . $tempFolder . '/site/data/admin.css') ) { - $mode = 'admin'; + $modele = 'admin'; } if (!empty($modele) ) { @@ -643,8 +643,6 @@ class theme extends common { $success = $zip->extractTo('.'); // traitement de l'erreur $notification = $success ? 'Le thème a été importé' : 'Erreur lors de l\'extraction, vérifiez les permissions.'; - // Supprimmer le dossier temporaire - $this->removeDir(self::TEMP_DIR . $tempFolder); // Check le thème $this->checkImport($modele); } else { @@ -652,6 +650,8 @@ class theme extends common { $success = false; $notification = 'Ce n\'est pas l\'archive d\'un thème !'; } + // Supprimer le dossier temporaire même si le thème est invalide + $this->removeDir(self::TEMP_DIR . $tempFolder); $zip->close(); } else { // erreur à l'ouverture