X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/f247cc770243a474bbba7845094047e0995b9746..0477bd232cbfcfc43a702a7c89fec6acbf99907c:/selfforum-cgi/shared/Posting/_lib.pm diff --git a/selfforum-cgi/shared/Posting/_lib.pm b/selfforum-cgi/shared/Posting/_lib.pm index 587ed9a..e8065ab 100644 --- a/selfforum-cgi/shared/Posting/_lib.pm +++ b/selfforum-cgi/shared/Posting/_lib.pm @@ -70,14 +70,19 @@ sub get_message_header ($) { # Messagebody auslesen ########################### -sub get_message_body ($$) { - my ($xml,$mid) = @_; +sub get_message_body ($$) +{ + my ($xml, $mid) = @_; my $body; - foreach ($xml -> getElementsByTagName ('ContentList', 1) -> item (0) -> getElementsByTagName ('MessageContent', 0)) { - if ($_ -> getAttribute ('mid') eq $mid) { + foreach ($xml -> getElementsByTagName ('ContentList', 1) -> item (0) -> getElementsByTagName ('MessageContent', 0)) + { + if ($_ -> getAttribute ('mid') eq $mid) + { $body = ($_ -> hasChildNodes)?$_ -> getFirstChild -> getData:''; - last;}} + last; + } + } \$body; } @@ -163,14 +168,15 @@ sub create_message_xml ($$$) { $message -> setAttribute ('flag', 'deleted') if ($msg -> {deleted}); # Header erzeugen - my $header = $xml -> createElement ('Header'); + my $header = $xml -> createElement ('Header'); # alles inside of 'Header' my $author = $xml -> createElement ('Author'); - my $name = $xml -> createElement ('Name'); - $name -> addText (toUTF8($msg -> {name})); - my $email = $xml -> createElement ('Email'); + my $name = $xml -> createElement ('Name'); + $name -> addText (toUTF8($msg -> {name})); + + my $email = $xml -> createElement ('Email'); my $category = $xml -> createElement ('Category'); $category -> addText (toUTF8($msg -> {cat})); @@ -181,8 +187,8 @@ sub create_message_xml ($$$) { my $date = $xml -> createElement ('Date'); $date -> setAttribute ('longSec', $msg -> {time}); - $author -> appendChild ($name); - $author -> appendChild ($email); + $author -> appendChild ($name); + $author -> appendChild ($email); $header -> appendChild ($author); $header -> appendChild ($category); $header -> appendChild ($subject); @@ -191,7 +197,9 @@ sub create_message_xml ($$$) { if ($msg -> {kids}) { for (@{$msg -> {kids}}) { - $message -> appendChild (&create_message_xml ($xml, $msges, $_));}} + $message -> appendChild (&create_message_xml ($xml, $msges, $_)); + } + } $message; } @@ -505,4 +513,4 @@ sub long_hr_time ($) { # ==================================================== # end of Posting::_lib -# ==================================================== \ No newline at end of file +# ====================================================