]> git.plutz.net Git - cgilite/blobdiff - index.cgi
introduced cookie array, extended urlsave function, IMPORTANT: removed " from array...
[cgilite] / index.cgi
index 9c068b54435e49f0d723e318b71a265f796be681..b407fc17ea0dcf6d556dba7b5ad5df5eb91189b2 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -36,7 +36,7 @@ _EXEC="${real%/shcgi/index.cgi}"  #execution directory
 # basic functions
 debug() { #change to false to disable debugging
   if [ "$DBG_ENABLED" = true -a -n "$*" ]; then
-    echo -E "$@" >>"$DBG_FILE"
+    printf '%s\n' "$*" >>"$DBG_FILE"
   elif [ "$DBG_ENABLED" = true -a -z "$*" ]; then
     tee -a "$DBG_FILE"
   elif [ -z "$*" ]; then
@@ -45,8 +45,8 @@ debug() { #change to false to disable debugging
 }
 
 die() {
-  debug "$@"
-  echo -E "$@" >>/dev/stderr
+  debug FATAL: "$*"
+  printf '%s\n' "$*" >&2
   exit 1
 }
 
@@ -74,10 +74,8 @@ cgi_get
 
 [ -x "$_EXEC/constants.sh" ] && . "$_EXEC/constants.sh"
 
-if [ -n "$_GET[\"action\"]" ]; then
+if [ -n "${_GET[action]}" ]; then
   . "$_EXEC/shcgi/action.sh"
-elif [ -n "$_GET[\"export\"]" ]; then
-  . "$_EXEC/shcgi/export.sh"
 else
   . "$_EXEC/shcgi/page.sh"
 fi