Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit MAXLOGAGE to 24h, just like FTL #2105

Merged
merged 2 commits into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
<?php /*
* Pi-hole: A black hole for Internet advertisements
<?php
/* Pi-hole: A black hole for Internet advertisements
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
$indexpage = true;
require "scripts/pi-hole/php/header.php";
require_once "scripts/pi-hole/php/gravity.php";
$indexpage = true;
require "scripts/pi-hole/php/header.php";
require_once "scripts/pi-hole/php/gravity.php";

function getinterval()
{
global $piholeFTLConf;
if(isset($piholeFTLConf["MAXLOGAGE"]))
{
return round(floatval($piholeFTLConf["MAXLOGAGE"]), 1);
}
else
{
return "24";
}
function getinterval()
{
global $piholeFTLConf;
if (isset($piholeFTLConf["MAXLOGAGE"])) {
return min(round(floatval($piholeFTLConf["MAXLOGAGE"]), 1), 24);
} else {
return "24";
}
}
?>
<!-- Sourceing CSS colors from stylesheet to be used in JS code -->
<span class="queries-permitted"></span>
Expand Down