]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Posting/Write.pm
Lock.pm: now you can convert a shared lock into an exclusive lock without a race...
[selfforum.git] / selfforum-cgi / shared / Posting / Write.pm
index 507cd81337b121778ea8bf018cb101122e921795..98f71fe886c1a673593fa03906ceb76b23c35ddb 100644 (file)
@@ -117,7 +117,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 +228,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

patrick-canterino.de