]> git.plutz.net Git - serve0/commitdiff
distinguish cgi fields in redirect, actually read fields first
authorpaul <paul@plutz.net>
Sat, 6 Sep 2014 19:31:45 +0000 (19:31 +0000)
committerpaul <paul@plutz.net>
Sat, 6 Sep 2014 19:31:45 +0000 (19:31 +0000)
svn path=/trunk/; revision=8

actions/multitag.sh

index 064bbe5393665cf40031614682eb28b01ae95bfb..c1f27c76eced67935c91751b587481bb3c8ad917 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/zsh
 
+filter="$_GET[\"f\"]"
+search="$_GET[\"s\"]"
+order=$(echo "$_GET[\"o\"]" |egrep '^(Name|Date|Length)$')
+page=$(echo "$_GET[\"p\"]" |egrep '^[0-9]+$')
+
 addtag(){
   meta="$1"
   tag="$2"
@@ -46,4 +51,4 @@ fi
 
 rm "${_DATA}"/cache/\?* 2>/dev/null
 
-echo -n "Location: ?o=$order&i=$info&s=$search&f=$filter#$info\n\n"
+echo -n "Location: ?o=$order&s=$search&f=$filter&p=$page#$info\n\n"