]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
Improve interface to format_html
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 16:05:21 +0000 (17:05 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 16:05:21 +0000 (17:05 +0100)
CGI/bug.pl
CGI/message.pl
Emesinae/CGI/Message.pm

index 3215880df29822d78e74476b3d023a3fdb599168..9e189b716c8d2c7a3334582855bdcc59f47ce828 100755 (executable)
@@ -104,7 +104,7 @@ my %handlers = (
 
             print "\n";
         },
-        Message => sub ($) { format_html( shift, $bug ); print hr . "\n" },
+        Message => sub ($) { format_html( shift, Bug => $bug ); print hr . "\n" },
         Footer => sub () { print end_html }
     }
 );
index c4f812a547b17ba5b5d1063373f85d03dc2518de..ced1d8e150e7bbf14fd9fd52da1ac08603c16044 100755 (executable)
@@ -95,7 +95,7 @@ elsif ( $mode eq "normal" ) {
         -title => $c{TrackerName} . ": " . $title,
         -style => { 'src' => $c{StyleSheet} }
     );
-    format_html( $msg, undef );
+    format_html( $msg );
     print end_html;
 }
 elsif ( $mode eq "part" ) {
index 8ab8af2852094df080c04b6bc29d3c7db8158842..8d421038b1e090924befcd61cc4a09784e6d252a 100644 (file)
@@ -154,9 +154,11 @@ sub parthdr {
       . " ($type, $disposition)" . "]";
 }
 
-sub format_html ($;$) {
+sub format_html ($;%) {
     my $m   = shift;
-    my $bug = shift;
+    my %attrs = @_;
+
+    my $bug = $attrs{Bug} || undef;
 
     print comment( "Message "
           . $m->{id} . ": "