From 79b11c6e49fd72ab72cad311429711dd8ce6bfd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 27 Jul 2021 00:56:29 +0200 Subject: [PATCH] Squashed 'cgilite/' changes from 4a04dc4..8be65ce 8be65ce bugfix: faulty check in update and append 904badc bugfix: parameter passing in cgilite_value calls git-subtree-dir: cgilite git-subtree-split: 8be65ce87fa07416c4d923cdc358ad885e49aaf7 --- cgilite.sh | 6 +++--- storage.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cgilite.sh b/cgilite.sh index f766ee2..9fa56ee 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -157,15 +157,15 @@ cgilite_keys(){ | sort -u } -GET(){ cgilite_value "${QUERY_STRING}" $@; } +GET(){ cgilite_value "${QUERY_STRING}" "$@"; } GET_COUNT(){ cgilite_count "${QUERY_STRING}" $1; } GET_KEYS(){ cgilite_keys "${QUERY_STRING}"; } -POST(){ cgilite_value "${cgilite_post}" $@; } +POST(){ cgilite_value "${cgilite_post}" "$@"; } POST_COUNT(){ cgilite_count "${cgilite_post}" $1; } POST_KEYS(){ cgilite_keys "${cgilite_post}"; } -REF(){ cgilite_value "${HTTP_REFERER#*\?}" $@; } +REF(){ cgilite_value "${HTTP_REFERER#*\?}" "$@"; } REF_COUNT(){ cgilite_count "${HTTP_REFERER#*\?}" $1; } REF_KEYS(){ cgilite_keys "${HTTP_REFERER#*\?}"; } diff --git a/storage.sh b/storage.sh index 355bd56..61eec88 100755 --- a/storage.sh +++ b/storage.sh @@ -161,7 +161,7 @@ DBM() { update|replace) k="$1" key="$(STRING "$1")" value="$(STRING "$2")" LOCK "$file" || return 1 - if ! DBM check "$k"; then + if ! DBM "$file" check "$k"; then RELEASE "$file" return 1 fi @@ -178,7 +178,7 @@ DBM() { append) key="$(STRING "$1")" value="$(STRING "$2")" LOCK "$file" || return 1 - if ! DBM check "$1"; then + if ! DBM "$file" check "$1"; then RELEASE "$file" return 1 fi -- 2.39.2