add option to empty cache

This commit is contained in:
quenousimporte 2024-07-09 17:14:54 +02:00
parent 19c4027e81
commit af2565314d
1 changed files with 16 additions and 0 deletions

View File

@ -114,6 +114,18 @@
date_default_timezone_set('Europe/Paris');
$date = (new DateTime('today'))->format('Ymd');
if (isset($_POST['emptycache']) && $_POST['emptycache'])
{
$files = glob('temp/*');
foreach($files as $file)
{
if(is_file($file))
{
unlink($file);
}
}
}
// Cafeyn
if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
{
@ -567,6 +579,10 @@
<label for="nyttoday">From today's paper embeded script</label>
<br><br>
<input id="emptycache" name="emptycache" type="checkbox">
<label for="emptycache">Empty cache</label>
<br><br>
<input type="submit">
</form>
</div>