]> git.plutz.net Git - serve0/blob - actions/watch.sh
adapted to update in shcgi
[serve0] / actions / watch.sh
1 #!/bin/zsh
2
3 cgi_refdata
4 info="${_GET[i]}"
5 order="${_REF[o]}"
6 search="${_REF[s]}"
7 filter="${_REF[f]}"
8 page="${_REF[pn]}"
9
10 watch_link=''
11 [ -n "$info" ]   && watch_link="i=$(echo -n "${info}" |sed -r 's:%:%25:g;s:\&:%26:g;')&"
12 [ -n "$order" ]  && watch_link="${watch_link}o=${order}&"
13 [ -n "$search" ] && watch_link="${watch_link}s=${search}&"
14 [ -n "$filter" ] && watch_link="${watch_link}f=${filter}&"
15 [ -n "$page" ]   && watch_link="${watch_link}pn=${page}"
16
17 echo -n "Location: ?p=view&${watch_link}\n\n"