]> git.plutz.net Git - webpoll/commitdiff
Squashed 'cgilite/' changes from 4a04dc4..8be65ce
authorPaul Hänsch <paul@plutz.net>
Mon, 26 Jul 2021 22:56:29 +0000 (00:56 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 26 Jul 2021 22:56:29 +0000 (00:56 +0200)
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
storage.sh

index f766ee2a425591245926952a5b961dde86cac4ee..9fa56eef0633f22e7fa5d8f901ddf776143a6a55 100755 (executable)
@@ -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#*\?}"; }
 
index 355bd569e40779602381612c36fafe6b839f418d..61eec88fb2cee63f706a634eaa48c85a09ef1967 100755 (executable)
@@ -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