From 4f6724b0f86ccffa091ca33c04e237b9dd5d4c4a Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 23 Oct 2013 15:25:27 +0800 Subject: Bug 895687: add UserStory extension --- Bugzilla/Bug.pm | 4 ++++ Bugzilla/Template.pm | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 0b17a02e6..9aa34b090 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -997,6 +997,10 @@ sub update { $_->update foreach @{ $self->{_update_ref_bugs} || [] }; delete $self->{_update_ref_bugs}; + # BMO - allow extensions to alter what is logged into bugs_activity + Bugzilla::Hook::process('bug_update_before_logging', + { bug => $self, timestamp => $delta_ts, changes => $changes, old_bug => $old_bug }); + # Log bugs_activity items # XXX Eventually, when bugs_activity is able to track the dupe_id, # this code should go below the duplicates-table-updating code below. diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 434e49da5..b529caf89 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -682,6 +682,14 @@ sub create { return $var; }, + # preserve newline by converting them to
+ html_br => sub { + my ($var) = @_; + $var = html_quote($var); + $var =~ s/\n/
/g; + return $var; + }, + # Prevents line break on hyphens and whitespaces. no_break => sub { my ($var) = @_; -- cgit v1.2.3-24-g4f1b