mirror of
https://github.com/pi-hole/web.git
synced 2025-12-25 05:05:33 +00:00
Use piholeFTLConfig() to resolve pihole-FTL.conf contents
Signed-off-by: Samu Voutilainen <smar@smar.fi>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
require "scripts/pi-hole/php/auth.php";
|
||||
require "scripts/pi-hole/php/password.php";
|
||||
require_once "scripts/pi-hole/php/FTL.php";
|
||||
$scriptname = basename($_SERVER['SCRIPT_FILENAME']);
|
||||
|
||||
check_cors();
|
||||
@@ -162,16 +163,7 @@
|
||||
$FTLpid = intval(pidofFTL());
|
||||
$FTL = ($FTLpid !== 0 ? true : false);
|
||||
|
||||
$piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf";
|
||||
if(is_readable($piholeFTLConfFile))
|
||||
{
|
||||
$piholeFTLConf = parse_ini_file($piholeFTLConfFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
$piholeFTLConf = array();
|
||||
}
|
||||
|
||||
$piholeFTLConf = piholeFTLConfig();
|
||||
?>
|
||||
<!doctype html>
|
||||
<!-- Pi-hole: A black hole for Internet advertisements
|
||||
|
||||
10
settings.php
10
settings.php
@@ -7,16 +7,10 @@
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
require "scripts/pi-hole/php/header.php";
|
||||
require "scripts/pi-hole/php/savesettings.php";
|
||||
require_once "scripts/pi-hole/php/FTL.php";
|
||||
// Reread ini file as things might have been changed
|
||||
$setupVars = parse_ini_file("/etc/pihole/setupVars.conf");
|
||||
if(is_readable($piholeFTLConfFile))
|
||||
{
|
||||
$piholeFTLConf = parse_ini_file($piholeFTLConfFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
$piholeFTLConf = array();
|
||||
}
|
||||
$piholeFTLConf = piholeFTLConfig();
|
||||
|
||||
// Handling of PHP internal errors
|
||||
$last_error = error_get_last();
|
||||
|
||||
Reference in New Issue
Block a user