From 3d3fc2947e5d848e7ea73bef7b6a34a9faa48091 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 8 Jul 2019 19:22:35 +0200 Subject: [PATCH] Review comments Signed-off-by: DL6ER --- advanced/Scripts/webpage.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 918fde27..227363f0 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -564,20 +564,22 @@ addAudit() # filled with its default value (date_added = current timestamp) validDomain="$(checkDomain "${domain}")" 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 + # 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 domains="${domains}," fi domains="${domains}('${domain}')" fi done - sqlite3 "${gravityDBfile}" "INSERT INTO \"domain_audit\" (domain) VALUES ${domains};" + sqlite3 "${gravityDBfile}" "INSERT INTO domain_audit (domain) VALUES ${domains};" } clearAudit() { - sqlite3 "${gravityDBfile}" "DELETE FROM \"domain_audit\";" + sqlite3 "${gravityDBfile}" "DELETE FROM domain_audit;" } SetPrivacyLevel() {