🔥 Fait le ménage des deals supprimés
This commit is contained in:
parent
2bb5bb7b5b
commit
162987131b
2
cron.php
2
cron.php
@ -82,6 +82,8 @@ if ($actions->connect()) {
|
|||||||
foreach ($deals_to_backup as $deal_to_backup) {
|
foreach ($deals_to_backup as $deal_to_backup) {
|
||||||
if (!file_exists(BACKUP_DEALS_DIR.'/'.$deal_to_backup->getId())) {
|
if (!file_exists(BACKUP_DEALS_DIR.'/'.$deal_to_backup->getId())) {
|
||||||
rename(EXISTING_DEALS_DIR . '/' . $deal_to_backup->getId(), BACKUP_DEALS_DIR . '/' . $deal_to_backup->getId());
|
rename(EXISTING_DEALS_DIR . '/' . $deal_to_backup->getId(), BACKUP_DEALS_DIR . '/' . $deal_to_backup->getId());
|
||||||
|
} else {
|
||||||
|
delete_folder(EXISTING_DEALS_DIR . '/' . $deal_to_backup->getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user