mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 19:29:20 +01:00
Don't require adlists to start in "http". This also displays lists that start in e.g., "ftp://" or "file://" or without a protocol.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -137,12 +137,17 @@ function readAdlists()
|
||||
{
|
||||
while (($line = fgets($handle)) !== false)
|
||||
{
|
||||
if(substr($line, 0, 5) === "#http")
|
||||
if(substr($line, 0, 1) === "#")
|
||||
{
|
||||
// Commented list
|
||||
array_push($list, [false,rtrim(substr($line, 1))]);
|
||||
// Comments start either with "##" or "# "
|
||||
if(substr($line, 1, 1) !== "#" &&
|
||||
substr($line, 1, 1) !== " ")
|
||||
{
|
||||
// Commented list
|
||||
array_push($list, [false,rtrim(substr($line, 1))]);
|
||||
}
|
||||
}
|
||||
elseif(substr($line, 0, 4) === "http")
|
||||
elseif(strlen($line) > 1)
|
||||
{
|
||||
// Active list
|
||||
array_push($list, [true,rtrim($line)]);
|
||||
|
||||
Reference in New Issue
Block a user