diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2013-02-20 23:19:57 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2013-02-20 23:19:57 +0100 |
commit | 9e840c56a6ad7a30f71f42c2e08adc401e4ddc6e (patch) | |
tree | 9f5c7459592eadb166de135c71942ccf1546a752 | |
parent | Merge branch 'upstream' (diff) | |
download | bugzilla-9e840c56a6ad7a30f71f42c2e08adc401e4ddc6e.tar.gz bugzilla-9e840c56a6ad7a30f71f42c2e08adc401e4ddc6e.tar.bz2 bugzilla-9e840c56a6ad7a30f71f42c2e08adc401e4ddc6e.zip |
InlineHistory and SecureMail update
-rw-r--r-- | extensions/InlineHistory/Extension.pm | 2 | ||||
-rw-r--r-- | extensions/SecureMail/Extension.pm | 23 | ||||
-rw-r--r-- | extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl | 11 |
3 files changed, 29 insertions, 7 deletions
diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index 2e388994a..f761a9fbd 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -92,7 +92,7 @@ sub template_before_process { my $field_obj; if ($change->{fieldname} =~ /^cf_/) { - $field_obj = Bugzilla::Field->new({ name => $change->{fieldname} }); + $field_obj = Bugzilla::Field->new({ name => $change->{fieldname}, cache => 1 }); } # identify buglist changes diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm index 3730d23e6..1ea691320 100644 --- a/extensions/SecureMail/Extension.pm +++ b/extensions/SecureMail/Extension.pm @@ -195,6 +195,29 @@ sub user_preferences { $$handled = 1; } +sub template_before_process { + my ($self, $args) = @_; + my $file = $args->{'file'}; + my $vars = $args->{'vars'}; + + # Bug dependency emails contain the subject of the dependent bug + # right before the diffs when a status has gone from open/closed + # or closed/open. We need to sanitize the subject of change.blocker + # similar to how we do referenced bugs + return unless + $file eq 'email/bugmail.html.tmpl' + || $file eq 'email/bugmail.txt.tmpl'; + + if (defined $vars->{diffs}) { + foreach my $change (@{ $vars->{diffs} }) { + next if !defined $change->{blocker}; + if (grep($_->secure_mail, @{ $change->{blocker}->groups_in })) { + $change->{blocker}->{short_desc} = "(Secure bug)"; + } + } + } +} + sub _send_test_email { my ($user) = @_; my $template = Bugzilla->template_inner($user->settings->{'lang'}->{'value'}); diff --git a/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl b/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl index f87ac82cb..076b3e26c 100644 --- a/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl +++ b/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl @@ -45,15 +45,14 @@ You'll need to provide a password when you export - pick a strong one, and then Then, you need to convert it to a .pem file. If you have OpenSSL installed, one way is as follows:</p> <p> -<code>openssl pkcs12 -in certificate.p12 -out certificate.pem -nodes</code></p> +<code>openssl pkcs12 -in certificate.p12 -out certificate.pem -nodes -nokeys</code></p> <p> -Open the .pem file in a text editor. You can recognise the public key because it starts "BEGIN CERTIFICATE" and ends "END CERTIFICATE" and -has an appropriate friendly name (e.g. "StartCom Free Certificate Member's StartCom Ltd. ID"). It is <b>not</b> the section beginning -"BEGIN RSA PRIVATE KEY", and it is not any of the intermediate certificates or root certificates.</p> +Open the .pem file in a text editor. You can recognise the public key because +it starts "BEGIN CERTIFICATE" and ends "END CERTIFICATE" and +has an appropriate friendly name (e.g. "StartCom Free Certificate Member's StartCom Ltd. ID").</p> -<p> -<b>Note: the .pem file has your private key in plaintext. Delete it once you have copied the public key out of it!</b></p> +<p>Paste the contents of the certificate into the SecureMail text field in [% terms.Bugzilla %].</p> <h2>PGP</h2> |