X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=poll.sh;h=bb5bc8db1d213dc0b46d3bdebacfe5a24d257c3f;hb=22d77b49555ed424e7d9064b06f37b8caa83f914;hp=de5b614c74321c93521a6ac0e1bb3c2e08f45d05;hpb=a193b5186dd4d330110f120fbc23277e426679f9;p=webpoll diff --git a/poll.sh b/poll.sh index de5b614..bb5bc8d 100644 --- a/poll.sh +++ b/poll.sh @@ -4,7 +4,10 @@ id="$(checkid "${PATH_INFO#/}")" file="${_DATA}/${id}" #cancel if poll is invalid -[ "$id" -a -f "$file" ] || REDIRECT "$_BASE/" +if [ ! "$id" -o ! -f "$file" ]; then + page_home; + return 0 +fi if expr match "$bookmarks" ".*${id}.*" >/dev/null; then :