]> git.plutz.net Git - serve0/blobdiff - actions/meta.sh
split up in distinct pages
[serve0] / actions / meta.sh
index a5f578cc8d4fb6cc81bb91a47ce4edf09ecb1afd..6de9f3890db1b8f77c9fbca22dd464a45d34fc9a 100755 (executable)
@@ -1,7 +1,11 @@
 #!/bin/zsh
 
 info="$_GET[\"i\"]"
-file="{$DATA}/meta/$info.meta"
+order="$_GET[\"o\"]"
+search="$_GET[\"s\"]"
+filter="$_GET[\"f\"]"
+page="$_GET[\"p\"]"
+file="${_DATA}/meta/$info.meta"
 
 cgi_post
 length="$_POST[\"length\"]"
@@ -9,10 +13,6 @@ width="$_POST[\"width\"]"
 height="$_POST[\"height\"]"
 trash="$_POST[\"trash\"]"
 cancel="$_POST[\"cancel\"]"
-filter="$_POST[\"f\"]"
-search="$_POST[\"s\"]"
-page="$_POST[\"p\"]"
-order="$_POST[\"o\"]"
 tagacc="$_POST[\"tag\"]"
 tags="$(echo "$_POST[\"tags\"]" \
         | sed -r 's:\t| :_:g;s:^!|\r|\$|\^::g;s:\\:\\\\:g;s/</\&lt\;/g;s/>/\&gt\;/g'
@@ -32,11 +32,12 @@ done
   rm ${_DATA}/cache/\?* 2>/dev/null
 else
   echo -e "$length\t$width\t$height\t$info" > "$file"
-  echo -e "${tagacc}${tags}" |tr '\n' '|' >> "$file"
+  echo -e "${tagacc}|${tags}" |tr '\n' '|' >> "$file"
   echo >>"$file"
   echo -e "${description}" >> "$file"
   rm "${_DATA}/cache/$info.cache" 2>/dev/null
   rm ${_DATA}/cache/\?* 2>/dev/null
+  rm ${_DATA}/cache/taglist 2>/dev/null
 fi
 
 echo -n "Location: ?i=&p=${page}&s=${search}&f=${filter}&o=${order}#$info\n\n"