X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=actions%2Fmeta.sh;h=1895f1dddc148e99f5476d5c1f37d7d871a576bc;hb=0619bc447c21ac196734848ae3b0aa786b6eb1ee;hp=10b188fef0bdab35f217fe5e299fd7a7f635429e;hpb=714fa51adcec29b6373f3cd94bc79c1e8dca0d30;p=serve0 diff --git a/actions/meta.sh b/actions/meta.sh index 10b188f..1895f1d 100755 --- a/actions/meta.sh +++ b/actions/meta.sh @@ -1,27 +1,27 @@ #!/bin/zsh -info="$_GET[\"i\"]" -order="$_GET[\"o\"]" -search="$_GET[\"s\"]" -filter="$_GET[\"f\"]" -page="$_GET[\"pn\"]" + info="${_GET[i]}" + order="${_GET[o]}" +search="${_GET[s]}" +filter="${_GET[f]}" + page="${_GET[pn]}" file="${_DATA}/meta/$info.meta" cgi_post -length="$_POST[\"length\"]" -width="$_POST[\"width\"]" -height="$_POST[\"height\"]" -trash="$_POST[\"trash\"]" -cancel="$_POST[\"cancel\"]" -tagacc="$_POST[\"tag\"]" -tags="$(echo "$_POST[\"tags\"]" \ +length="${_POST[length]}" + width="${_POST[width]}" +height="${_POST[height]}" + trash="${_POST[trash]}" +cancel="${_POST[cancel]}" +tagacc="${_POST[tag]}" +tags="$(echo "${_POST[tags]}" \ | sed -r 's:\t| :_:g;s:^!|\r|\$|\^::g;s:\\:\\\\:g;s//\>\;/g' )" -description="$(echo -e "$_POST[\"description\"]" \ +description="$(echo -e "${_POST[description]}" \ |sed 's/\r//g;s/\\/\\\\/g;s//\>\;/g' )" -n=0; while [ -n "$_POST[\"tag$n\"]" ]; do - tagacc="$_POST[\"tag$n\"]|$tagacc" +n=0; while [ -n "${_POST[tag$n]}" ]; do + tagacc="${_POST[tag$n]}|$tagacc" n=$(($n + 1)) done