Modify adlists subpage of the settings page to sources the lists from the gravity database.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-04-28 20:42:50 +02:00
parent 406a946b24
commit ced7174c37
4 changed files with 32 additions and 42 deletions

View File

@@ -6,8 +6,23 @@
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license */
function getGravityDBFilename()
{
// Get possible non-standard location of FTL's database
$FTLsettings = parse_ini_file("/etc/pihole/pihole-FTL.conf");
if(isset($FTLsettings["GRAVITYDB"]))
{
return $FTLsettings["GRAVITYDB"];
}
else
{
return "/etc/pihole/gravity.db";
}
}
function SQLite3_connect_try($filename, $mode, $trytoreconnect)
{ try
{
try
{
// connect to database
return new SQLite3($filename, $mode);