From d07af82bf03572875d4b8b9594d3d10cc25bb36a Mon Sep 17 00:00:00 2001 From: CasparA Date: Mon, 14 Nov 2016 11:14:40 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20file=5Fcount=20muss=20auch=20um=201=20r?= =?UTF-8?q?eduziert=20werden,=20wenn=20Dateien=20rausgeworfen=20werden=20i?= =?UTF-8?q?n=20der=20Schleife.=20Und=20ich=20pr=C3=BCfe=20auf=203=20versch?= =?UTF-8?q?iedene=20Apache/cURL=20Sortierungen=20und=20werfe=20die=20auch?= =?UTF-8?q?=20raus,=20bleibt=20der=20Fehler=20f=C3=BCr=20das=20Warning=20m?= =?UTF-8?q?it=20den=20Verzeichnissen,=20siehe=20Forum.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ffrouter_parsen.function.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ffrouter_parsen.function.php b/ffrouter_parsen.function.php index 605f20d..3594d5d 100644 --- a/ffrouter_parsen.function.php +++ b/ffrouter_parsen.function.php @@ -48,11 +48,13 @@ if (filter_var($community[$community_id]["download_path"], FILTER_VALIDATE_URL) if(is_dir($firmware_download_path.$entwicklung[$i]."/".$installation[$j]."/".$files[$entwicklung[$i]][$installation[$j]][$x])) { array_splice($files[$entwicklung[$i]][$installation[$j]], $x, 1); $x--; + $file_count--; } else { $pos = stripos($files[$entwicklung[$i]][$installation[$j]][$x], 'manifest'); if($pos !== false) { array_splice($files[$entwicklung[$i]][$installation[$j]], $x, 1); $x--; + $file_count--; } } } @@ -141,7 +143,6 @@ if (filter_var($community[$community_id]["download_path"], FILTER_VALIDATE_URL) if (!remoteFileExists($firmware_download_path)) { throw new Exception("Firmwareverzeichnis offline oder nicht existent!"); } - $err = 0; $entwicklung_count = count($entwicklung); $installation_count = count($installation); @@ -155,7 +156,7 @@ if (filter_var($community[$community_id]["download_path"], FILTER_VALIDATE_URL) $variante[$entwicklung[$i]][$installation[$j]] = 1; preg_match_all('/href=[\'"]?([^\'" >]+)/', file_get_contents($firmware_download_path.$entwicklung[$i]."/".$installation[$j]."/"), $files_in_HTTP); foreach($files_in_HTTP["0"] as $key=>$value){ - if (strpos($value, 'manifest') !== false) { + if ((strpos($value, 'manifest') !== false) || (strpos($value, '?C=M;O=A') !== false) || (strpos($value, '?C=S;O=A') !== false) || (strpos($value, '?C=S;O=A') !== false)) { unset($files_in_HTTP["0"][$key]); } }