From: paul Date: Sat, 13 Jun 2015 14:52:45 +0000 (+0000) Subject: rename page cgi variable to p X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=fa5c15e6e36107359d926ece94df2b614f37a37b;p=cgilite rename page cgi variable to p svn path=/trunk/; revision=3 --- diff --git a/action.sh b/action.sh index 0077575..390c5ef 100755 --- 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 fce83fb..a260233 100755 --- 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 }