mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 02:39:25 +01:00
merge devel
This commit is contained in:
15
api.php
15
api.php
@@ -70,7 +70,16 @@
|
||||
}
|
||||
elseif (isset($_GET['disable'], $_GET['token']) && $auth) {
|
||||
check_csrf($_GET['token']);
|
||||
exec('sudo pihole disable');
|
||||
$disable = intval($_GET['disable']);
|
||||
// intval returns the integer value on success, or 0 on failure
|
||||
if($disable > 0)
|
||||
{
|
||||
exec("sudo pihole disable ".$disable."s");
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo pihole disable');
|
||||
}
|
||||
$data = array_merge($data, Array(
|
||||
"status" => "disabled"
|
||||
));
|
||||
@@ -80,6 +89,10 @@
|
||||
$data = array_merge($data, getGravity());
|
||||
}
|
||||
|
||||
if (isset($_GET['tailLog'])) {
|
||||
$data = array_merge($data, tailPiholeLog($_GET['tailLog']));
|
||||
}
|
||||
|
||||
function filterArray(&$inArray) {
|
||||
$outArray = array();
|
||||
foreach ($inArray as $key=>$value) {
|
||||
|
||||
Reference in New Issue
Block a user