tazpanel rev 100
index.cgi: use $SCRIPT_NAME
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 14 21:27:07 2011 +0200 (2011-04-14) |
parents | 1f6667794d15 |
children | 12dfc9e0bdfe |
files | index.cgi |
line diff
1.1 --- a/index.cgi Thu Apr 14 21:00:28 2011 +0200 1.2 +++ b/index.cgi Thu Apr 14 21:27:07 2011 +0200 1.3 @@ -39,7 +39,7 @@ 1.4 rm -rf $tmp ;; 1.5 button) 1.6 cat <<EOT 1.7 - <a class="button" href='/index.cgi?file=$1&action=diff'> 1.8 + <a class="button" href='$SCRIPT_NAME?file=$1&action=diff'> 1.9 <img src="$IMAGES/help.png" />`gettext "Differences"`</a> 1.10 EOT 1.11 esac 1.12 @@ -69,7 +69,7 @@ 1.13 echo "<h2>$file</h2>" 1.14 if [ "$(GET action)" == "edit" ]; then 1.15 cat <<EOT 1.16 -<form method="post" action="/index.cgi?file=$file"> 1.17 +<form method="post" action="$SCRIPT_NAME?file=$file"> 1.18 <img src="$IMAGES/edit.png" /> 1.19 <input type="submit" value="`gettext "Save"`"> 1.20 <textarea name="content" rows="30" style="width: 100%;"> 1.21 @@ -88,7 +88,7 @@ 1.22 EOT 1.23 cat <<EOT 1.24 <div id="actions"> 1.25 - <a class="button" href='/index.cgi?file=$file&action=edit'> 1.26 + <a class="button" href='$SCRIPT_NAME?file=$file&action=edit'> 1.27 <img src="$IMAGES/edit.png" />`gettext "Edit"`</a> 1.28 EOT 1.29 file_is_modified $file button