Browse Source

Changes the deletion time

merge-requests/1/head
Erase 4 years ago
parent
commit
2684895f2e
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      flux.php
  2. +2
    -2
      generate.php

+ 1
- 1
flux.php View File

@ -11,7 +11,7 @@
$conf = TL_ROOT . '/../../c/'.$_GET['c'];
//~ Update file date (file is deleted if is not updated every 3 weeks)
//~ Update file date (file is deleted if is not updated every 30 days)
touch($conf);
//~ Open conf


+ 2
- 2
generate.php View File

@ -97,8 +97,8 @@
while (false !== ($file = readdir($handle))){
//~ Check the file we're doing is actually a file
if (is_file($path.$file) && $file !== 'index.php' && $file !== '.gitignore'){
//~ Check if the file is older than 3 week old
if (filemtime($path.$file) < (time() - (3 * 7 * 24 * 60 * 60))){ //~ 3 weeks
//~ Check if the file is older than 30 days old
if (filemtime($path.$file) < (time() - (30 * 24 * 60 * 60))){ //~ 3 days
//~ Do the deletion
unlink($path.$file);
}


Loading…
Cancel
Save