From d89fb7a0e0961cc5e21e5538eefe6cdff55c69be Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 20 Dec 2016 21:38:51 +0100 Subject: [PATCH] Have to modify the correct array for this to work... --- data.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/data.php b/data.php index c12dec25..dd5c5c5b 100644 --- a/data.php +++ b/data.php @@ -271,7 +271,6 @@ function getDomains($file, &$array, $action){ $file->rewind(); - $lines=[]; foreach ($file as $line) { // Strip newline (and possibly carriage return) from end of key $key = rtrim($line); @@ -280,17 +279,15 @@ // (e.g. once in gravity list, once in blacklist) if($action && strlen($key) > 0) { - $lines[$key] = true; + $array[$key] = true; } - elseif(isset($lines[$key])) + elseif(isset($array[$key])) { // $action is not true (we want to remove) *and* key is set - unset($lines[$key]); + unset($array[$key]); } // else: Remove, but not set -> don't have to don anything } - - return $lines; } function getGravity() {