X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/ba659b53059e637777865e646f0f2a6fb7f2988e..232104002cf82c14d1fbf1536f937e9cf7e318f3:/selfforum-cgi/user/fo_posting.pl diff --git a/selfforum-cgi/user/fo_posting.pl b/selfforum-cgi/user/fo_posting.pl index fc8b182..86a24fa 100644 --- a/selfforum-cgi/user/fo_posting.pl +++ b/selfforum-cgi/user/fo_posting.pl @@ -1,13 +1,14 @@ #!/usr/bin/perl -# ==================================================== -# Autor: n.d.p. / 2001-01-23 -# lm : n.d.p. / 2001-01-25 -# ==================================================== -# Funktion: -# Entgegennahme von Postings und -# Darstellung der "Neue Nachricht"-Seite -# ==================================================== +################################################################################ +# # +# File: user/fo_posting.pl # +# # +# Authors: André Malo , 2001-01-25 # +# # +# Description: Accept new postings, display "Neue Nachricht" page # +# # +################################################################################ use strict; use vars qw($Bin $Shared $Script %subhash $httpurl $flocked); @@ -32,7 +33,6 @@ use Template; use Template::Posting; use CGI qw(param header); - use XML::DOM; print header (-type => 'text/html'); @@ -78,13 +78,16 @@ else { # end of main / Funktionen # ==================================================== -################################ -# sub check_reply_dupe -# -# Reply moeglich? -# Doppelposting? -################################ +### check_reply_dupe () ######################################################## +# +# Reply moeglich? Doppelposting? +# +# Params: -none- +# Return: Dupe check result +# 'Dupe' - Posting is a dupe +# Nothing - ok. +# sub check_reply_dupe () { my $stat; @@ -92,12 +95,11 @@ sub check_reply_dupe () { if ($stat == 0) { # ueberlastet oder so violent_unlock_file (forum_filename); - return 'Occupied';} - - else { - return 'masterLock';}} - - else { + return 'Occupied'; + } else { + return 'masterLock'; + } + } else { my ($i, %msg, %unids); $flocked = 1; @@ -121,13 +123,14 @@ sub check_reply_dupe () { if (exists($dparam{$formdata -> {followUp} -> {name}})) { return 'noReply' unless (exists($msg{$fmid}));} - %unids = map {$_ => 1} @{$threads -> {$ftid} -> [$msg{$fmid}] -> {unids}};} - - else { - %unids = map {$_ => 1} @$unids;} + %unids = map {$_ => 1} @{$threads -> {$ftid} -> [$msg{$fmid}] -> {unids}}; + } else { + %unids = map {$_ => 1} @$unids; + } # jetzt endlich - return 'Dupe' if (exists ($unids{$dparam{$formdata -> {uniqueID} -> {name}}}));} + return 'Dupe' if (exists ($unids{$dparam{$formdata -> {uniqueID} -> {name}}})); + } return; } @@ -180,7 +183,8 @@ sub got_new () { $thx -> {category} => plain ($dparam {$formdata -> {posterCategory} -> {name}}), $thx -> {home} => plain ($dparam {$formdata -> {posterURL} -> {name}}), $thx -> {image} => plain ($dparam {$formdata -> {posterImage} -> {name}}), - $thx -> {subject} => plain ($dparam {$formdata -> {posterSubject} -> {name}})})};} + $thx -> {subject} => plain ($dparam {$formdata -> {posterSubject} -> {name}})})}; + } return; } @@ -445,13 +449,15 @@ sub check_param () { # === $failed=1; foreach (@{$formmust -> {$gotKeys {$formdata -> {followUp} -> {name}}?'reply':'new'}}) { - return 'missingKey' unless ($gotKeys {$formdata -> {$_} -> {name}});} + return 'missingKey' unless ($gotKeys {$formdata -> {$_} -> {name}}); + } # 3 # === foreach (param) { $failed = $name {$_}; - return 'unexpectedKey' unless (exists ($name {$_}));} + return 'unexpectedKey' unless (exists ($name {$_})); + } # 4 # === @@ -520,4 +526,4 @@ BEGIN { # ==================================================== # end of fo_posting.pl -# ==================================================== \ No newline at end of file +# ====================================================