X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/489e7846289d4fb66eb4b9fab0fed4af719b98ee..408b8a7b8262c7808c79bba94f09026a9db2ac04:/selfforum-cgi/shared/Posting/Write.pm diff --git a/selfforum-cgi/shared/Posting/Write.pm b/selfforum-cgi/shared/Posting/Write.pm index 507cd81..b7338f6 100644 --- a/selfforum-cgi/shared/Posting/Write.pm +++ b/selfforum-cgi/shared/Posting/Write.pm @@ -11,7 +11,11 @@ package Posting::Write; ################################################################################ use strict; -use vars qw(%error @EXPORT); +use vars qw( + %error + @EXPORT + $VERSION +); use Encode::Plain; $Encode::Plain::utf8 = 1; use Encode::Posting; @@ -39,6 +43,12 @@ use XML::DOM; noParent => '4 could not find parent message' ); +################################################################################ +# +# Version check +# +$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; + ################################################################################ # # Export @@ -117,7 +127,7 @@ sub write_new_thread ($) { save_file ($param -> {forumFile}, $forum) or return $error{forumWrite}; release_file ($param -> {messagePath}.$tid.'.xml'); - return (0, $thread, $mid); + return (0, $thread, $mid, $tid); } ### sub write_reply_posting ($) ################################################ @@ -228,14 +238,14 @@ sub write_reply_posting ($) { $param -> {parsedThreads}, { dtd => $param -> {dtd}, lastMessage => $mid, - lastThread => $tid + lastThread => 't'.$param -> {lastThread} } ); save_file ($param -> {forumFile}, $forum) or return $error{forumWrite}; } - return (0, $thread, $mid); + return (0, $thread, $mid, $tid); } # keep 'require' happy