From 6db4590f9bc598179bbed35b66a3e583a04984c0 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Thu, 10 Feb 2005 01:30:17 +0000 Subject: Bug 11901 : Change Bugzilla comments line-wrapping policy Patch by Max Kanat-Alexander r=gerv,justdave a=justdave --- attachment.cgi | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'attachment.cgi') diff --git a/attachment.cgi b/attachment.cgi index a5407e8b0..d58395efc 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -893,11 +893,6 @@ sub insert my $comment = "Created an attachment (id=$attachid)\n$::FORM{'description'}\n"; $comment .= ("\n" . $::FORM{'comment'}) if $::FORM{'comment'}; - use Text::Wrap; - $Text::Wrap::columns = 80; - $Text::Wrap::huge = 'overflow'; - $comment = Text::Wrap::wrap('', '', $comment); - AppendComment($::FORM{'bugid'}, Bugzilla->user->login, $comment, @@ -1151,35 +1146,17 @@ sub update # add the comment to the bug. if ( $::FORM{'comment'} ) { - use Text::Wrap; - $Text::Wrap::columns = 80; - $Text::Wrap::huge = 'wrap'; - # Prepend a string to the comment to let users know that the comment came from # the "edit attachment" screen. my $comment = qq|(From update of attachment $::FORM{'id'})\n| . $::FORM{'comment'}; - my $wrappedcomment = ""; - foreach my $line (split(/\r\n|\r|\n/, $comment)) - { - if ( $line =~ /^>/ ) - { - $wrappedcomment .= $line . "\n"; - } - else - { - $wrappedcomment .= wrap('', '', $line) . "\n"; - } - } - # Get the user's login name since the AppendComment function needs it. my $who = DBID_to_name($::userid); # Mention $::userid again so Perl doesn't give me a warning about it. my $neverused = $::userid; # Append the comment to the list of comments in the database. - AppendComment($bugid, $who, $wrappedcomment, $::FORM{'isprivate'}, $timestamp); - + AppendComment($bugid, $who, $comment, $::FORM{'isprivate'}, $timestamp); } # Define the variables and functions that will be passed to the UI template. -- cgit v1.2.3-24-g4f1b