X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=index.cgi;h=4d7e8aa6fc045cdd1f49a29637d8b664917b3df4;hp=421b81e95ece53ff9c0c58f096518b596062bb0c;hb=cdb3e3cbc4b7b2009d88833b3a802e73c0213f4c;hpb=fd407665aaedc1bea44ac34ec1440fa2e9cf8795 diff --git a/index.cgi b/index.cgi index 421b81e..4d7e8aa 100755 --- a/index.cgi +++ b/index.cgi @@ -42,6 +42,10 @@ case $ACTION in fi REDIRECT "$(POST ref)" ;; + multitag) + . "$_EXEC/multitag.sh" + REDIRECT "$(POST ref)" + ;; esac if [ "$ITEM" = "/style.css" ]; then @@ -53,14 +57,14 @@ elif [ "$ITEM" = "/stereoview.js" ]; then FILE "$_EXEC/stereoview.js" elif [ -f "$_DATA/$ITEM" ]; then case $ACTION in - tag) - ;; thumbnail) . "$_EXEC/cgilite/file.sh" + . "$_EXEC/thumbnail.sh" index="$_DATA/${ITEM%/*}/.index" thumb="$index/${ITEM##*/}"; thumb="${thumb%.*}.jpg" - [ -d "$index" -a \! -f "$thumb" ] \ - && file="$_DATA/$ITEM" . "$_EXEC/thumbnail.sh" + [ -d "$index" -a ! -f "$thumb" ] \ + && { printf %s "$ITEM" |grep -qE -e "${file_pattern}" ;} \ + && gen_thumb "$_DATA/$ITEM" "$thumb" FILE "$thumb" ;; delete) @@ -85,10 +89,6 @@ elif [ -d "$_DATA/$ITEM" ]; then fi REDIRECT "$(POST ref)" ;; - multitag) - . "$_EXEC/multitag.sh" - REDIRECT "$(POST ref)" - ;; *) . "$_EXEC/list.sh" ;; esac