summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-10-25 13:54:38 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2021-10-27 12:26:32 +0200
commitaa7a002a4e5c5edc0377b14497f0dd166e2071bb (patch)
tree02c752686a890c3146b54b75204b84bfcedd8ef8
parent5403022c376a53f3c52c4c49e3fd12a7e5ce53a0 (diff)
Support cache cleaning for tiptorrent image parts
Tiptorrent downloads and saves images to the cache in parts. With this commit, WebConsole shows and deletes all parts as one.
-rw-r--r--admin/WebConsole/comandos/EliminarImagenCache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/admin/WebConsole/comandos/EliminarImagenCache.php b/admin/WebConsole/comandos/EliminarImagenCache.php
index 6c9e92ba..60a24cea 100644
--- a/admin/WebConsole/comandos/EliminarImagenCache.php
+++ b/admin/WebConsole/comandos/EliminarImagenCache.php
@@ -348,6 +348,10 @@ switch($ambito){
$ima[$x] = str_replace(".img.diff", "", $ima[$x]); //quitar todos los .img
$ima[$x]=trim($ima[$x]);
$nombreimagenes[]="f-".$ima[$x];
+ } elseif (preg_match("/\.[0-3]/", $ima[$x])) {
+ $ima[$x] = preg_replace("/\.img\.[0-3]/", "", $ima[$x]);
+ $ima[$x] = trim($ima[$x]);
+ $nombreimagenes[] = "f-".$ima[$x];
}else{
$ima[$x] = str_replace(".img", "", $ima[$x]); //quitar todos los .img
$ima[$x]=trim($ima[$x]);