summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorgerv%gerv.net <>2001-10-12 08:07:54 +0200
committergerv%gerv.net <>2001-10-12 08:07:54 +0200
commit67b3cc06cb39fa6a8dac48041e3483e54ba3228a (patch)
treedae7f2ba4b22e199c26390f877e9cde3d85c6fce /globals.pl
parent3454a7dfce9e6612035213b9cc67e233e7b0f61a (diff)
downloadbugzilla-67b3cc06cb39fa6a8dac48041e3483e54ba3228a.tar.gz
bugzilla-67b3cc06cb39fa6a8dac48041e3483e54ba3228a.tar.xz
Bug 71840 - Make comments referenceable. Patch by gerv; r=myk, jake (ish :-).
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl36
1 files changed, 26 insertions, 10 deletions
diff --git a/globals.pl b/globals.pl
index eedfa12e3..401d9eef2 100644
--- a/globals.pl
+++ b/globals.pl
@@ -884,6 +884,22 @@ sub quoteUrls {
$things[$count++] = $item;
}
+ # Either a comment string or no comma and a compulsory #.
+ while ($text =~ s/\bbug(\s|%\#)*(\d+)(\s*comment)?\s*(\s|%\#)(\d+)/"##$count##"/ei) {
+ my $item = $&;
+ my $bugnum = $2;
+ my $comnum = $6;
+ $item = GetBugLink($bugnum, $item);
+ $item =~ s/(id=\d+)/$1#$comnum/;
+ $things[$count++] = $item;
+ }
+ while ($text =~ s/\bcom(ment)?(\s|%\#)*(\d+)/"##$count##"/ei) {
+ my $item = $&;
+ my $num = $3;
+ $item = value_quote($item);
+ $item = qq{<A HREF="#$num">$item</A>};
+ $things[$count++] = $item;
+ }
while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) {
my $item = $&;
my $num = $2;
@@ -1040,16 +1056,16 @@ sub GetLongDescriptionAsHTML {
my ($who, $email, $when, $text) = (FetchSQLData());
$email .= Param('emailsuffix');
if ($count) {
- $result .= "<BR><BR><I>------- Additional Comments From ";
- if ($who) {
- $result .= qq{<A HREF="mailto:$email">$who</A> } .
- time2str("%Y-%m-%d %H:%M", str2time($when)) .
- " -------</I><BR>\n";
- } else {
- $result .= qq{<A HREF="mailto:$email">$email</A> } .
- time2str("%Y-%m-%d %H:%M", str2time($when)) .
- " -------</I><BR>\n";
- }
+ $result .= "<BR><BR><I>------- Additional Comment <a name='$count' href='#$count'>#$count</a> From ";
+ if ($who) {
+ $result .= qq{<A HREF="mailto:$email">$who</A> } .
+ time2str("%Y-%m-%d %H:%M", str2time($when));
+ } else {
+ $result .= qq{<A HREF="mailto:$email">$email</A> } .
+ time2str("%Y-%m-%d %H:%M", str2time($when));
+ }
+
+ $result .= " -------</I><BR>\n";
}
$result .= "<PRE>" . quoteUrls(\%knownattachments, $text) . "</PRE>\n";
$count++;