From fd0764d92cd9839b9cd7687d746ae4881fdfb958 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 20 Jan 2017 17:40:20 +0100 Subject: [PATCH] Codacy --- scripts/pi-hole/php/takeout.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/pi-hole/php/takeout.php b/scripts/pi-hole/php/takeout.php index 9857e4c2..fdac40c9 100644 --- a/scripts/pi-hole/php/takeout.php +++ b/scripts/pi-hole/php/takeout.php @@ -3,17 +3,17 @@ require('func.php'); function process_zip($name) { global $zip; - $fp = $zip->getStream($name); - if(!$fp) + $zippointer = $zip->getStream($name); + if(!$zippointer) { echo "$name not found in provided ZIP file, skipping...
"; return; } $contents = ""; - while (!feof($fp)) { - $contents .= fread($fp, 4096); + while (!feof($zippointer)) { + $contents .= fread($zippointer, 4096); } - fclose($fp); + fclose($zippointer); $domains = array_filter(explode("\n",$contents)); check_domains($domains); return $domains; @@ -53,10 +53,8 @@ function getWildcardListContent() { return implode("\n",array_unique($list)); } - else - { - return ""; - } + + return ""; } if($_POST["action"] == "in")