X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=write%2Fprojectmeta.cgi;h=c2ee4427ff718ab95327b463260b87518bf0aeca;hp=436f31e391f3c71889f3ce0517bde98043295dd6;hb=dec8e37f896df024ebc157e26ef6ce1f2811a103;hpb=fab4a9447d82bd1d8530524673bf8c6a773b91fa diff --git a/write/projectmeta.cgi b/write/projectmeta.cgi index 436f31e..c2ee442 100755 --- a/write/projectmeta.cgi +++ b/write/projectmeta.cgi @@ -25,13 +25,18 @@ $ACL_ADMIN || exit 0 if [ -n "${CONTENT_LENGTH}" -a "${CONTENT_LENGTH}" -gt 0 ]; then (head -c "${CONTENT_LENGTH}"; echo)|sed 's/&/\n/g' \ - |sed -rn '/^((appName|appSlogan|svnRepo|gitRepo|flattrThingURL|paypalAddress|btcAddress|btcAdAddress)=.*|repoType=(svn|git)|(useFlattr|usePaypal|useBitcoin)=yes|advertise=(btcAd|no)|btcAdContent=[1-4])$/{ + |sed -rn '/^((appName|appSlogan|svnRepo|gitRepo|flattrThingURL|paypalAddress|btcAddress|btcAdAddress)=.*|repoType=(svn|git)|(useFlattr|usePaypal|useBitcoin|btcAdGamble|btcAdErotic)=yes|advertise=(btcAd|no))$/{ s:\+: :g;s:%:\\x:g;p}' \ |while line="$(line)"; do eval "$(echo -e "$line" |sed -r 's:[\n\r'\'']::g;s:^([a-zA-Z0-9_+-]+)=(.*)$:\1='"'\2'"':;')" done fi +[ "$btcAdGamble" = yes -a "$btcAdErotic" = yes ] && btcAdContent=1 +[ "$btcAdGamble" != yes -a "$btcAdErotic" = yes ] && btcAdContent=2 +[ "$btcAdGamble" = yes -a "$btcAdErotic" != yes ] && btcAdContent=3 +[ "$btcAdGamble" != yes -a "$btcAdErotic" != yes ] && btcAdContent=4 + echo "\ name=$appName slogan=$appSlogan