X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/1ba7ec317a9899f4b2201d02ffc9e93bd6cf46cc..d8a1fb31ed6883aef6a7ba78a117269218966a10:/selfforum-cgi/shared/Posting/Handle.pm?ds=sidebyside diff --git a/selfforum-cgi/shared/Posting/Handle.pm b/selfforum-cgi/shared/Posting/Handle.pm index 5ca6556..9d2a94a 100644 --- a/selfforum-cgi/shared/Posting/Handle.pm +++ b/selfforum-cgi/shared/Posting/Handle.pm @@ -43,18 +43,24 @@ sub hide_posting($$$) change_posting_visibility($tfile, 't'.$tid, 'm'.$mid, 1); # Forum - change_posting_visibility($forum, 't'.$tid, 'm'.$mid, 1); - - #my $f = get_all_threads($forum, 1, 0); - #for (@{f->{$tid}}) - #{ - # if ($_->{'mid'} == $mid) - # { - # $_->{'deleted'} = 1; - # } - #} - # - #create_forum_xml_string($f, ); + #change_posting_visibility($forum, 't'.$tid, 'm'.$mid, 1); # OBSOLETE + + my ($f, $lthread, $lmsg, $dtd, $zlev) = get_all_threads($forum, 1, 0); + + for (@{$f->{$tid}}) + { + if ($_->{'mid'} == $mid) + { + $_->{'deleted'} = 1; + } + } + + my %cfxs = ( + 'dtd' => $dtd, + 'lastMessage' => $lmsg, + 'lastThread' => $lthread + ); + create_forum_xml_string($f, \%cfxs); } ### recover_posting() ########################################################## @@ -78,18 +84,24 @@ sub recover_posting($$$) change_posting_visibility($tfile, 't'.$tid, 'm'.$mid, 0); # Forum - change_posting_visibility($forum, 't'.$tid, 'm'.$mid, 0); - - #my $f = get_all_threads($forum, 1, 0); - #for (@{f->{$tid}}) - #{ - # if ($_->{'mid'} == $mid) - # { - # $_->{'deleted'} = 0; - # } - #} - # - #create_forum_xml_string($f, ); + #change_posting_visibility($forum, 't'.$tid, 'm'.$mid, 0); # OBSOLETE + + my ($f, $lthread, $lmsg, $dtd, $zlev) = get_all_threads($forum, 1, 0); + + for (@{$f->{$tid}}) + { + if ($_->{'mid'} == $mid) + { + $_->{'deleted'} = 0; + } + } + + my %cfxs = ( + 'dtd' => $dtd, + 'lastMessage' => $lmsg, + 'lastThread' => $lthread + ); + create_forum_xml_string($f, \%cfxs); } ### change_posting_visibility () ###############################################