@EXPORT = qw(hide_posting recover_posting);
-use Posting::_lib;
+use Posting::_lib qw(get_message_node);
use XML::DOM;
my $parser = new XML::DOM::Parser;
my $xml = $parser->parsefile($fname);
+ # Set flag in given msg
my $mnode = get_message_node($xml, $tid, $mid);
$mnode->setAttribute('invisible', $invisible);
+ # Set flag in sub nodes
+ for ($mnode->getElementsByTagName('Message'))
+ {
+ $_->setAttribute('invisible', $invisible);
+ }
+
$xml->printToFile($fname.'.temp');
rename $fname.'.temp', $fname;
}