wok-stable rev 6044
tazpkg-web/search.cgi: GET args should be compatible with POST args
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 17 09:32:11 2010 +0200 (2010-08-17) |
parents | 38ac44e9ff3d |
children | c155fb472602 |
files | tazpkg-web/stuff/search.cgi |
line diff
1.1 --- a/tazpkg-web/stuff/search.cgi Tue Aug 17 10:25:30 2010 +0000 1.2 +++ b/tazpkg-web/stuff/search.cgi Tue Aug 17 09:32:11 2010 +0200 1.3 @@ -18,7 +18,11 @@ 1.4 VERBOSE=0 1.5 for i in $(echo $REQUEST_URI | sed 's/[?&]/ /g'); do 1.6 SLITAZ_VERSION=cooking 1.7 - case "$i" in 1.8 + case "$(echo $i | tr [A-Z] [a-z])" in 1.9 + search=*) 1.10 + SEARCH=${i#*=};; 1.11 + object=*) 1.12 + OBJECT=${i#*=};; 1.13 verbose=*) 1.14 VERBOSE=${i#*=};; 1.15 lang=*) 1.16 @@ -44,18 +48,17 @@ 1.17 depends=*) 1.18 SEARCH=${i#*=} 1.19 OBJECT=Depends;; 1.20 - BuildDepends=*) 1.21 + builddepends=*) 1.22 SEARCH=${i#*=} 1.23 OBJECT=BuildDepends;; 1.24 - FileOverlap=*) 1.25 + fileoverlap=*) 1.26 SEARCH=${i#*=} 1.27 OBJECT=FileOverlap;; 1.28 version=s*|version=3*) 1.29 SLITAZ_VERSION=stable;; 1.30 - version=2*) 1.31 - SLITAZ_VERSION=2.0;; 1.32 - version=1*) 1.33 - SLITAZ_VERSION=1.0;; 1.34 + version=[1-9]*) 1.35 + i=${version%%.*} 1.36 + SLITAZ_VERSION=${i#*=}.0;; 1.37 esac 1.38 done 1.39 [ -n "$SEARCH" ] && REQUEST_METHOD="POST"