]> git.plutz.net Git - cgilite/commitdiff
rename page cgi variable to p
authorpaul <paul@plutz.net>
Sat, 13 Jun 2015 14:52:45 +0000 (14:52 +0000)
committerpaul <paul@plutz.net>
Sat, 13 Jun 2015 14:52:45 +0000 (14:52 +0000)
svn path=/trunk/; revision=3

action.sh
page.sh

index 0077575ce2b5e62d571c851fbc76aa63c5ebbb77..390c5ef616d0217385892ca34a7ed952ebed5170 100755 (executable)
--- a/action.sh
+++ b/action.sh
@@ -19,6 +19,6 @@
 
 ACTION="$(echo "$_GET[\"action\"]" |egrep '^[a-zA-Z0-9_-]+$')"
 ACTION="${_EXEC}/actions/${ACTION}.sh"
-[ -x "$ACTION" ] || echo -n "Location: http://$HTTP_HOST/?page=error\n\n"
+[ -x "$ACTION" ] || echo -n "Location: /?p=error\n\n"
 
 . $ACTION
diff --git a/page.sh b/page.sh
index fce83fb067e379ece27a4f291a80fc80d05ef839..a260233f5fe836f320f321d431839da45e2418e1 100755 (executable)
--- a/page.sh
+++ b/page.sh
@@ -19,7 +19,7 @@
 
 echo -n "Content-Type: text/html;charset=utf-8\n\n"
 
-PAGE="$(echo "$_GET[\"page\"]" |egrep '^[a-zA-Z0-9_-]+$')"
+PAGE="$(echo "$_GET[\"p\"]" |egrep '^[a-zA-Z0-9_-]+$')"
 PAGE="${_EXEC}/pages/${PAGE}.sh"
 [ -x "$PAGE" ] || PAGE="${_EXEC}/pages/error.sh"
 
@@ -27,7 +27,7 @@ NAVIGATION() {
   for each in "${_EXEC}"/pages/*.sh; do
     link="$(echo "$each" |sed -r "s:^.*/([^/]*)\.sh$:\1:")"
     title="$($each title)"
-    [ -n "$title" ] && echo "/?page=$link $title"
+    [ -n "$title" ] && echo "/?p=$link $title"
   done
 }