Changed line endings

- Also changed return to die
This commit is contained in:
Mcat12
2016-01-17 17:07:49 -05:00
parent 8f150e634e
commit 84d11b570e
6 changed files with 301 additions and 301 deletions

View File

@@ -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));