Have to modify the correct array for this to work...

This commit is contained in:
DL6ER
2016-12-20 21:38:51 +01:00
parent be5a6cb5df
commit d89fb7a0e0
+3 -6
View File
@@ -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() {