[Rt-devel] PATCH: silence warnings Search/Elements/BuildFormatString

Jim Meyer purp at acm.org
Wed Nov 16 21:08:09 EST 2005


Attached.

--j
-- 
Jim Meyer, Geek at Large                                    purp at acm.org
-------------- next part --------------
--- share/html/Search/Elements/BuildFormatString	2005-04-17 13:14:08.000000000 -0700
+++ local/html/Search/Elements/BuildFormatString	2005-11-16 17:52:54.000000000 -0800
@@ -226,13 +226,15 @@
 
 my @format_string;
 foreach my $field (@seen) {
     next unless $field;
-    my $row = "'" . $field->{Prefix};
+    my $row = "'";
+    $row .= $field->{Prefix} if $field->{Prefix};
     $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape
 		    : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__"
       unless ( $field->{Column} eq "<blank>" );
-    $row .= $field->{Suffix} . "'";
+    $row .= $field->{Suffix} if $field->{Suffix};
+    $row .= "'";
     push( @format_string, $row );
 }
 
 $Format = join(",\n", @format_string);


More information about the Rt-devel mailing list