diff options
-rwxr-xr-x | wgetpaste | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -65,7 +65,7 @@ osl_EXPIRATION_VALUES=(f d m) ca_WARNS=(1024000 1\ MB) rafb_WARNS=(512000 512\ kB http://rafb.net/p/toofast.html "You must wait at least 10 seconds between each paste! Try again in 10 seconds.") # POST data -engines_POST=(EXTRA NICK DESCRIPTION LANGUAGE EXPIRATION CVT_TABS INPUT) +engines_POST=(EXTRA NICK DESCRIPTION LANGUAGE EXPIRATION CVT_TABS) ca_POST=(s=Submit+Post name description type expiry "" content) rafb_POST=("" nick desc lang "" cvt_tabs text) osl_POST=(paste=Send poster "" format expiry "" code2) @@ -229,15 +229,14 @@ postdata() { local extra field sep nr [[ 7 -eq $(eval "echo \"\${#${ENGINE}_POST[*]}\"") ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()." extra="$(eval "echo -n \"\${${ENGINE}_POST[0]}\"")" - sep="&" nr=${#engines_POST[*]} - [[ -n ${extra} ]] && echo -n "${extra}${sep}" + [[ -n ${extra} ]] && echo -n "${extra}&" for ((i=1; i<${nr}; i++)); do field="$(eval "echo \${${ENGINE}_POST[i]}")" - [[ ${i} -eq ${nr}-1 ]] && sep=$'\n' [[ -z ${field} ]] && continue - eval "echo -n \"${field}=\${${engines_POST[i]}}\${sep}\"" + eval "echo -n \"${field}=\${${engines_POST[i]}}&\"" done + echo "$(eval "echo \${${ENGINE}_POST[i]}")=${INPUT}" } geturl() { |