From 0deec384bc9682e33378f5dc0418d836699537c5 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 17 Mar 2024 15:37:46 +0100 Subject: [PATCH] 1.7.05 clean auto backup --- core/module/config/tool/cleanautobackup.php | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 core/module/config/tool/cleanautobackup.php diff --git a/core/module/config/tool/cleanautobackup.php b/core/module/config/tool/cleanautobackup.php new file mode 100644 index 0000000..732ac56 --- /dev/null +++ b/core/module/config/tool/cleanautobackup.php @@ -0,0 +1,22 @@ +isFile() && $file->getExtension() === 'tar.gz') { + // Vérifie si le fichier a été modifié avant la limite de temps + if ($file->getMTime() < $timeLimit) { + // Supprime le fichier + unlink($file->getRealPath()); + } + } +} +?>