]> git.plutz.net Git - serve0/blobdiff - index.cgi
do not require reference uri in advsearch
[serve0] / index.cgi
index 8790fa9b814edb4dc71cd01714859658fd8b51d6..d6535e77a9e316358d12c81943f6ab0b2ddebd2b 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -6,7 +6,6 @@
 file_pattern='^.*\.(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|ogv|webm|iso|rmvb)$'
 
 . "$_EXEC/cgilite/cgilite.sh"
-. "$_EXEC/widgets.sh"
 
 FILTER="$(GET f)"
 SEARCH="$(GET s)"
@@ -34,7 +33,7 @@ elif [ -f "$_DATA/$ITEM" ]; then
     thumbnail)
       . "$_EXEC/cgilite/file.sh"
       index="$_DATA/${ITEM%/*}/.index"
-      thumb="$index/${ITEM##*/}.jpg"
+      thumb="$index/${ITEM##*/}"; thumb="${thumb%.*}.jpg"
       [ -d "$index" -a \! -f "$thumb" ] \
       && file="$_DATA/$ITEM" . "$_EXEC/thumbnail.sh"
       FILE "$thumb"
@@ -47,6 +46,9 @@ elif [ -f "$_DATA/$ITEM" ]; then
   esac
 elif [ -d "$_DATA/$ITEM" ]; then
   case $(GET a) in
+    advsearch)
+      . "$_EXEC/advsearch.sh"
+    ;;
     spawnindex)
       if [ "$(POST recursive)" = yes ]; then
         find "$_DATA/$ITEM" -depth -type d \! -name .index \