From e506450c7e0d041c8ba9a70418246aaf8e3ef1db Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 7 Aug 2019 19:16:04 +0200 Subject: [PATCH] [9.2.04] htaccess dans temp --- CHANGES.md | 4 ++++ core/core.php | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c9112873..cce358e3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## Version 9.2.04 +- Correction : + - Conserver htaccess dans le dossier temp lors du nettoyage + ## Version 9.2.03 - Corrections : - Menu fixe en dehors du site : diff --git a/core/core.php b/core/core.php index aad95fdc..4e8eea84 100644 --- a/core/core.php +++ b/core/core.php @@ -32,7 +32,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '9.2.03'; + const ZWII_VERSION = '9.2.04'; public static $actions = []; public static $coreModuleIds = [ @@ -966,7 +966,10 @@ class core extends common { if($lastClearTmp > $this->getData(['core', 'lastClearTmp']) + 86400) { $iterator = new DirectoryIterator(self::TEMP_DIR); foreach($iterator as $fileInfos) { - if($fileInfos->isFile() AND $fileInfos->getBasename() !== '.gitkeep') { + if( $fileInfos->isFile() && + $fileInfos->getBasename() !== '.htaccess' && + $fileInfos->getBasename() !== '.gitkeep' + ) { @unlink($fileInfos->getPathname()); } }