# 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;
}
$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}));
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);
if ($msg -> {kids}) {
for (@{$msg -> {kids}}) {
- $message -> appendChild (&create_message_xml ($xml, $msges, $_));}}
+ $message -> appendChild (&create_message_xml ($xml, $msges, $_));
+ }
+ }
$message;
}
# ====================================================
# end of Posting::_lib
-# ====================================================
\ No newline at end of file
+# ====================================================