Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDL6ER <DL6ER@users.noreply.github.com>2019-11-12 23:50:19 +0300
committerGitHub <noreply@github.com>2019-11-12 23:50:19 +0300
commit7f7b9d089ce1e50deea043c518e672fedd20c59e (patch)
tree6e2aaad85a2e8de771be3f86908f015e35041284 /advanced
parent61d233f06939513bb331196bf4c08ce1860936cb (diff)
parent5bac1ad58b2b2b179f308da2e997f69467d9037f (diff)
Merge pull request #2965 from pi-hole/tweak/BackendChangesForAdlistComments
backend changes to allow comment when adding new adlist
Diffstat (limited to 'advanced')
-rwxr-xr-xadvanced/Scripts/webpage.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh
index 8aa3fa08..7bbdabdf 100755
--- a/advanced/Scripts/webpage.sh
+++ b/advanced/Scripts/webpage.sh
@@ -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