+### modify_posting () ##########################################################
+#
+# Modify a posting (only subject and category until now!)
+#
+# Params: $forum Path and filename of forum
+# $tpath Path to thread files
+# \%info Reference: 'thread', 'posting', 'indexFile', 'data'
+# (data = \%hashref: 'subject', 'category', 'body')
+# Return: -none-
+#
+sub modify_posting($$$)
+{
+ my ($forum, $tpath, $info) = @_;
+ my ($tid, $mid, $indexFile, $data) = ($info->{'thread'},
+ $info->{'posting'},
+ $info->{'indexFile'},
+ $info->{'data'});
+ my ($subject, $category, $body) = ($data->{'subject'}, $data->{'category'}, $data->{'body'});
+
+ my %msgdata;
+
+ # These values may be changed by change_posting_value()
+ $subject && $msgdata{'Subject'} = $subject;
+ $category && $msgdata{'Category'} = $category;
+
+ # Thread
+ my $tfile = $tpath . '/t' . $tid . '.xml';
+ change_posting_value($tfile, 't'.$tid, 'm'.$mid, \$msgdata);
+ $body && change_posting_body($tfile, 't'.$tid, 'm'.$mid, $body);
+
+ # Forum (does not contain msg bodies)
+ #change_posting_value($forum, 't'.$tid, 'm'.$mid, \$msgdata);