]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/process
switch from htmllog to use append_action_to_log in process
[debbugs.git] / scripts / process
index d2dff109a7ab043b6c2df427e2cf70c2a8bff7c8..8e4a0f850adf8bddf3d327bfb00110b44bca8ee6 100755 (executable)
@@ -28,6 +28,8 @@ use Debbugs::Text qw(:templates);
 use Debbugs::Status qw(:versions);
 use Debbugs::Config qw(:globals :config);
 
+use Debbugs::Control qw(append_action_to_log);
+
 chdir( "$gSpoolDir" ) || die "chdir spool: $!\n";
 
 #open(DEBUG,"> /tmp/debbugs.debug");
@@ -916,16 +918,14 @@ die "wot no exit";
 
 sub htmllog {
     my ($whatobj,$whatverb,$where,$desc) = @_;
-    my $hash = get_hashname($ref);
-    open(AP,">>db-h/$hash/$ref.log") || die "opening db-h/$hash/$ref.log (lh): $!";
-    print(AP
-          "\6\n".
-          "<strong>$whatobj $whatverb</strong>".
-          ($where eq '' ? "" : " to <code>".html_escape($where)."</code>").
-          ":<br>\n". $desc.
-          "\n\3\n") || die "writing db-h/$hash/$ref.log (lh): $!";
-    close(AP) || die "closing db-h/$hash/$ref.log (lh): $!";
-}    
+    append_action_to_log(bug => $ref,
+                        action => "$whatobj $whatverb",
+                        requester => '',
+                        request_addr => $where,
+                        desc         => $desc,
+                        get_lock     => 0,
+                       );
+}
 
 sub stripbccs {
     my $msg = shift;
@@ -1038,7 +1038,9 @@ sub fill_template{
      my $hole_var = {'&bugurl' =>
                     sub{"$_[0]: ".
                              'http://'.$config{cgi_domain}.'/'.
-                                  Debbugs::CGI::bug_url($_[0]);
+                                  Debbugs::CGI::bug_links(bug=>$_[0],
+                                                          links_only => 1,
+                                                         );
                    }
                    };
      return fill_in_template(template => $template,