From 6ca35b0b763dfca0bc9af656362148bf6ca6f18f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 6 Aug 2019 20:32:49 +0200 Subject: [PATCH] Update comment and change require() to require_once(). Signed-off-by: DL6ER --- scripts/pi-hole/php/add.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/php/add.php b/scripts/pi-hole/php/add.php index ecec95dc..9b3e3ce8 100644 --- a/scripts/pi-hole/php/add.php +++ b/scripts/pi-hole/php/add.php @@ -16,8 +16,8 @@ if (empty($api)) { list_verify($type); } -// Don't check if the added item is a valid domain for regex expressions. Regex -// filters are validated by FTL on import and skipped if invalid +// Only check domains we add to the exact lists. +// Regex are validated by FTL during import $check_lists = ["white","black","audit"]; if(in_array($list, $check_lists)) { check_domain(); @@ -27,8 +27,7 @@ if(in_array($list, $check_lists)) { $domains = explode(",",$_POST['domain']); require_once("func.php"); - -require("database.php"); +require_once("database.php"); $GRAVITYDB = getGravityDBFilename(); $db = SQLite3_connect($GRAVITYDB, SQLITE3_OPEN_READWRITE);