mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
8382f4d727
commit
3d3fc2947e
1 changed files with 5 additions and 3 deletions
|
@ -564,20 +564,22 @@ addAudit()
|
||||||
# filled with its default value (date_added = current timestamp)
|
# filled with its default value (date_added = current timestamp)
|
||||||
validDomain="$(checkDomain "${domain}")"
|
validDomain="$(checkDomain "${domain}")"
|
||||||
if [[ -n "${validDomain}" ]]; then
|
if [[ -n "${validDomain}" ]]; then
|
||||||
# Put comma in between () when there is
|
# Put comma in between domains when there is
|
||||||
# more than one domains to be added
|
# more than one domains to be added
|
||||||
|
# SQL INSERT allows adding multiple rows at once using the format
|
||||||
|
## INSERT INTO table (domain) VALUES ('abc.de'),('fgh.ij'),('klm.no'),('pqr.st');
|
||||||
if [[ -n "${domains}" ]]; then
|
if [[ -n "${domains}" ]]; then
|
||||||
domains="${domains},"
|
domains="${domains},"
|
||||||
fi
|
fi
|
||||||
domains="${domains}('${domain}')"
|
domains="${domains}('${domain}')"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
sqlite3 "${gravityDBfile}" "INSERT INTO \"domain_audit\" (domain) VALUES ${domains};"
|
sqlite3 "${gravityDBfile}" "INSERT INTO domain_audit (domain) VALUES ${domains};"
|
||||||
}
|
}
|
||||||
|
|
||||||
clearAudit()
|
clearAudit()
|
||||||
{
|
{
|
||||||
sqlite3 "${gravityDBfile}" "DELETE FROM \"domain_audit\";"
|
sqlite3 "${gravityDBfile}" "DELETE FROM domain_audit;"
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPrivacyLevel() {
|
SetPrivacyLevel() {
|
||||||
|
|
Loading…
Reference in a new issue