diff options
author | Byron Jones <glob@mozilla.com> | 2014-12-22 09:36:04 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-12-22 09:36:04 +0100 |
commit | a670bb1a0c33f108f1e4211c95c3c6f80c09eecd (patch) | |
tree | 30eb6f71eb4b9616319e38e4b45cab29b7f2835c /extensions/InlineHistory/Extension.pm | |
parent | 4ccf1f41b4d167de56e4dca2cad0db8bf16dcf56 (diff) | |
download | bugzilla-a670bb1a0c33f108f1e4211c95c3c6f80c09eecd.tar.gz bugzilla-a670bb1a0c33f108f1e4211c95c3c6f80c09eecd.tar.xz |
Bug 860297: "see also" links shown by inline history which link to the current bugzilla installation should show tooltips
Diffstat (limited to 'extensions/InlineHistory/Extension.pm')
-rw-r--r-- | extensions/InlineHistory/Extension.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index 803262517..4cff558c7 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -12,6 +12,7 @@ use base qw(Bugzilla::Extension); use Bugzilla::User::Setting; use Bugzilla::Constants; use Bugzilla::Attachment; +use Bugzilla::Util 'correct_urlbase'; our $VERSION = '1.5'; @@ -124,6 +125,24 @@ sub template_before_process { } } + # split see-also + if ($change->{fieldname} eq 'see_also') { + my $url_base = correct_urlbase(); + foreach my $f (qw( added removed )) { + my @values; + foreach my $value (split(/, /, $change->{$f})) { + my ($bug_id) = substr($value, 0, length($url_base)) eq $url_base + ? $value =~ /id=(\d+)$/ + : undef; + push @values, { + url => $value, + bug_id => $bug_id, + }; + } + $change->{$f} = \@values; + } + } + # split multiple flag changes (must be processed last) if ($change->{fieldname} eq 'flagtypes.name') { my @added = split(/, /, $change->{added}); |