X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=actions%2Fwikimeta.sh;fp=actions%2Fwikimeta.sh;h=0a197192fa221f13ff671f288cf77ab5671295a1;hp=51236c9135599d7bc5fc61511016f61dc7f4415b;hb=5940c0b0af8a0e7793ad77c17c9415ce5b7f8859;hpb=e6133c890222e735b322df23f5931c59cea06ae6 diff --git a/actions/wikimeta.sh b/actions/wikimeta.sh index 51236c9..0a19719 100755 --- a/actions/wikimeta.sh +++ b/actions/wikimeta.sh @@ -19,7 +19,7 @@ $ACL_WIKIEDIT || echo "Location: ?p=Error&i=noaccess\n\n" $ACL_WIKIEDIT || exit 0 info="$(egrep -o '(^|&)i=[0-9]{10}_[0-9]{3}(&|$)' <<<"${QUERY_STRING}" |tr -d '&i=')" -info="$(echo -E "$_GET[\"i\"]" |grep -Ex '[0-9]{10}_[0-9]{3}')" +info="$(printf %s\\n "${_GET[i]}" |grep -Ex '[0-9]{10}_[0-9]{3}')" [ -z "$info" ] && info="$(date +%s)_$(apg -M N -a 1 -n 1 -m 3 -x 3)" descfile="$_DATA/Wiki/$info.meta" @@ -29,10 +29,10 @@ commfile="$_DATA/Wiki/$info.comment.$(date +%s)_$(apg -M N -a 1 -n 1 -m 3 -x 3)" anchor=$(ls "$_DATA/Wiki" |grep -A2 $info |grep '.meta$' |tail -n1 |cut -d. -f1) cgi_post -title="$_POST[\"title\"]" -description="$_POST[\"desc\"]" -comment="$_POST[\"comm\"]" -[ -n "$_POST[\"cancel\"]" ] && cancel=true +title="${_POST[title]}" +description="${_POST[desc]}" +comment="${_POST[comm]}" +[ -n "${_POST[cancel]}" ] && cancel=true if [ -z "$cancel" -a -n "$comment" ]; then touch "$_DATA/Wiki/$info"