tazbug diff web/bugs.cgi @ rev 53

bugs.cgi: Use $script/$SCRIPT_NAME rather than WEB_URL
author Christophe Lincoln <pankso@slitaz.org>
date Tue Jan 07 15:22:49 2014 +0100 (2014-01-07)
parents 3acb15d87d6e
children 05ac6fa12843
line diff
     1.1 --- a/web/bugs.cgi	Tue Jan 07 15:14:34 2014 +0100
     1.2 +++ b/web/bugs.cgi	Tue Jan 07 15:22:49 2014 +0100
     1.3 @@ -59,8 +59,8 @@
     1.4  </div>
     1.5  
     1.6  <div id="footer">
     1.7 -	<a href="$WEB_URL">SliTaz Bugs</a> -
     1.8 -	<a href="$WEB_URL?README">README</a>
     1.9 +	<a href="$script">SliTaz Bugs</a> -
    1.10 +	<a href="$script?README">README</a>
    1.11  </div>
    1.12  
    1.13  </body>
    1.14 @@ -143,7 +143,7 @@
    1.15  	cat << EOT
    1.16  
    1.17  <div id="search">
    1.18 -	<form method="get" action="$WEB_URL">
    1.19 +	<form method="get" action="$script">
    1.20  		<input type="text" name="search" placeholder="$(gettext 'Search')" />
    1.21  		<!-- <input type="submit" value="$(gettext 'Search')" /> -->
    1.22  	</form>
    1.23 @@ -281,7 +281,7 @@
    1.24  	fi
    1.25  	cat << EOT
    1.26  <h2>$(eval_gettext 'Bug $id: $STATUS')</h2>
    1.27 -<form method="get" action="$WEB_URL">
    1.28 +<form method="get" action="$script">
    1.29  
    1.30  <p>
    1.31  	$(get_gravatar $MAIL 32) <strong>$BUG</strong>
    1.32 @@ -395,7 +395,7 @@
    1.33  <h2>$(gettext "New Bug")</h2>
    1.34  <div id="newbug">
    1.35  
    1.36 -<form method="get" action="$WEB_URL" onsubmit="return checkNewBug();">
    1.37 +<form method="get" action="$script" onsubmit="return checkNewBug();">
    1.38  	<input type="hidden" name="addbug" />
    1.39  	<table>
    1.40  		<tbody>
    1.41 @@ -440,7 +440,7 @@
    1.42  <h2>$(eval_gettext 'Edit Bug $bug')</h2>
    1.43  <div id="edit">
    1.44  
    1.45 -<form method="get" action="$WEB_URL">
    1.46 +<form method="get" action="$script">
    1.47  	<textarea name="bugconf">$(cat $bugdir/$bug/bug.conf)</textarea>
    1.48  	<input type="hidden" name="bug" value="$bug" />
    1.49  	<input type="submit" value="$(gettext 'Save configuration')" />
    1.50 @@ -535,7 +535,7 @@
    1.51  
    1.52  		if [  ! -f $AUTH_FILE ] ; then
    1.53  			js_log "$AUTH_FILE (defined in \$AUTH_FILE) has not been found."
    1.54 -			js_redirection_to "$WEB_URL?login$IDLOC"
    1.55 +			js_redirection_to "$script?login$IDLOC"
    1.56  		fi;
    1.57  
    1.58  		valid=$(fgrep "${user}:" $AUTH_FILE | cut -d ":" -f 2)
    1.59 @@ -548,10 +548,10 @@
    1.60  			echo "$md5session" > $sessions/$user
    1.61  			js_set_cookie 'auth' "$user:$md5session"
    1.62  			js_log "Login authentification has been executed & accepted :)"
    1.63 -			js_redirection_to "$WEB_URL$IDLOC"
    1.64 +			js_redirection_to "$script$IDLOC"
    1.65  		else
    1.66  			js_log "Login authentification has been executed & refused"
    1.67 -			js_redirection_to "$WEB_URL?login&error$IDLOC"
    1.68 +			js_redirection_to "$script?login&error$IDLOC"
    1.69  		fi
    1.70  		html_footer ;;
    1.71  	*\ signup\ *)
    1.72 @@ -619,7 +619,7 @@
    1.73  		if check_auth; then
    1.74  			rm -f "$sessions/$user"
    1.75  			js_unset_cookie 'auth'
    1.76 -			js_redirection_to "$WEB_URL"
    1.77 +			js_redirection_to "$script"
    1.78  		fi ;;
    1.79  	*\ user\ *)
    1.80  		# User profile
    1.81 @@ -651,7 +651,7 @@
    1.82  		html_header
    1.83  		if check_auth; then
    1.84  			new_bug
    1.85 -			js_redirection_to "$WEB_URL?id=$count"
    1.86 +			js_redirection_to "$script?id=$count"
    1.87  		fi ;;
    1.88  	*\ edit\ *)
    1.89  		bug="$(GET edit)"
    1.90 @@ -665,7 +665,7 @@
    1.91  		html_header
    1.92  		if check_auth; then
    1.93  			save_bug
    1.94 -			js_redirection_to "$WEB_URL?id=$bug"
    1.95 +			js_redirection_to "$script?id=$bug"
    1.96  		fi ;;
    1.97  	*\ id\ *)
    1.98  		# Empty deleted messages to keep msg count working.
    1.99 @@ -740,7 +740,7 @@
   1.100  		user_box
   1.101  		cat << EOT
   1.102  <h2>$(gettext "Search")</h2>
   1.103 -<form method="get" action="$WEB_URL">
   1.104 +<form method="get" action="$script">
   1.105  	<input type="text" name="search" />
   1.106  	<input type="submit" value="$(gettext 'Search')" />
   1.107  </form>