mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
backend changes to allow comment when adding new adlist
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
2e138eb99f
commit
5bac1ad58b
1 changed files with 3 additions and 1 deletions
|
@ -404,13 +404,15 @@ SetWebUILayout() {
|
|||
CustomizeAdLists() {
|
||||
local address
|
||||
address="${args[3]}"
|
||||
local comment
|
||||
comment="${args[4]}"
|
||||
|
||||
if [[ "${args[2]}" == "enable" ]]; then
|
||||
sqlite3 "${gravityDBfile}" "UPDATE adlist SET enabled = 1 WHERE address = '${address}'"
|
||||
elif [[ "${args[2]}" == "disable" ]]; then
|
||||
sqlite3 "${gravityDBfile}" "UPDATE adlist SET enabled = 0 WHERE address = '${address}'"
|
||||
elif [[ "${args[2]}" == "add" ]]; then
|
||||
sqlite3 "${gravityDBfile}" "INSERT OR IGNORE INTO adlist (address) VALUES ('${address}')"
|
||||
sqlite3 "${gravityDBfile}" "INSERT OR IGNORE INTO adlist (address, comment) VALUES ('${address}', '${comment}')"
|
||||
elif [[ "${args[2]}" == "del" ]]; then
|
||||
sqlite3 "${gravityDBfile}" "DELETE FROM adlist WHERE address = '${address}'"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue