mirror of
https://github.com/pi-hole/web.git
synced 2026-05-02 06:32:49 +01:00
Changed line endings
- Also changed return to die
This commit is contained in:
28
php/get.php
28
php/get.php
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
if(!isset($_GET['list']))
|
||||
die();
|
||||
|
||||
$type = $_GET['list'];
|
||||
$rawList = file_get_contents("/etc/pihole/${type}list.txt");
|
||||
$list = explode("\n", $rawList);
|
||||
|
||||
// Get rid of empty lines
|
||||
for($i = sizeof($list)-1; $i >= 0; $i--) {
|
||||
if($list[$i] == "")
|
||||
unset($list[$i]);
|
||||
}
|
||||
|
||||
<?php
|
||||
if(!isset($_GET['list']))
|
||||
die();
|
||||
|
||||
$type = $_GET['list'];
|
||||
$rawList = file_get_contents("/etc/pihole/${type}list.txt");
|
||||
$list = explode("\n", $rawList);
|
||||
|
||||
// Get rid of empty lines
|
||||
for($i = sizeof($list)-1; $i >= 0; $i--) {
|
||||
if($list[$i] == "")
|
||||
unset($list[$i]);
|
||||
}
|
||||
|
||||
echo json_encode(array_values($list));
|
||||
Reference in New Issue
Block a user