diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index c10eb5e9e..d12ebbe18 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -526,7 +526,7 @@ sub _check_bug { sub _legal_content_type { my ($content_type) = @_; my $legal_types = join('|', LEGAL_CONTENT_TYPES); - return $content_type !~ /^($legal_types)\/.+$/; + return $content_type =~ /^($legal_types)\/.+$/; } sub _check_content_type { @@ -991,7 +991,7 @@ sub get_content_type { # specified in the HTTP request headers. $content_type = $cgi->uploadInfo($cgi->param('data'))->{'Content-Type'}; - if (!_valid_content_type($content_type) && Bugzilla->params->{mime_types_file}) + if (!_legal_content_type($content_type) && Bugzilla->params->{mime_types_file}) { if (!$lwp_read_mime_types) { @@ -1001,7 +1001,7 @@ sub get_content_type { my $file = $cgi->param('data'); $content_type = LWP::MediaTypes::guess_media_type("$file"); } - if (!_valid_content_type($content_type)) + if (!_legal_content_type($content_type)) { $content_type = 'application/octet-stream'; } @@ -1030,5 +1030,5 @@ sub get_content_type { return $content_type; } - 1; +__END__ diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 31fb1ba54..2991b5992 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -469,6 +469,7 @@ sub Send { if ($user->email_enabled && $dep_ok) { # OK, OK, if we must. Email the user. $sent_mail = sendMail( + bug => $bug, user => $user, headers => \@headerlist, rels => \%rels_which_want, @@ -503,11 +504,11 @@ sub sendMail my %arguments = @_; my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef, $diffs, $comments_in, $isnew, - $id, $watchingRef + $id, $watchingRef, $bug ) = @arguments{qw( user headers rels values defhead fields diffs newcomm isnew - id watch + id watch bug )}; my @send_comments = @$comments_in; @@ -575,6 +576,7 @@ sub sendMail showfieldvalues => \@showfieldvalues, to => $user->email, to_user => $user, + bug => $bug, bugid => $id, alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", classification => $values{'classification'}, diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index e800ffcf3..16c5eefbc 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -23,7 +23,7 @@ package Bugzilla::Hook; use strict; -no strict 'subs'; +no strict 'refs'; use Bugzilla::Util; use base 'Exporter'; our @EXPORT = qw(set_hook run_hooks); @@ -73,13 +73,14 @@ sub process } elsif (!ref $f && $f =~ /^(.*)::[^:]*$/) { - my $pk = $1; + my $pk = $1 . '.pm'; if ($pk) { eval { require $pk }; if ($@) { warn "Error autoloading hook package $pk: $@"; + next; } } } diff --git a/Bugzilla/Template/Plugin/Hook.pm b/Bugzilla/Template/Plugin/Hook.pm index 3ad6cece7..7e43bbf91 100644 --- a/Bugzilla/Template/Plugin/Hook.pm +++ b/Bugzilla/Template/Plugin/Hook.pm @@ -81,7 +81,6 @@ sub _get_hooks { foreach my $template_dir (@$dir_set) { my $file = "$template_dir/hook/$extension_template"; if (-e $file) { - warn "-e $file !"; my $template = $self->_context->template($file); push(@hooks, $template); # Don't run the hook for more than one language. diff --git a/skins/standard/show_bug.css b/skins/standard/show_bug.css index ebff630b4..ffcb2731a 100644 --- a/skins/standard/show_bug.css +++ b/skins/standard/show_bug.css @@ -131,4 +131,4 @@ table#flags { white-space: nowrap; } -#commentt { width: 50em; font-size: medium; font-family: monospace; } +#comment_textarea { width: 50em; font-size: medium; font-family: monospace; } diff --git a/template/en/custom/global/user-error-page.html.tmpl b/template/en/custom/global/user-error-page.html.tmpl index 87583666a..e93d1035a 100644 --- a/template/en/custom/global/user-error-page.html.tmpl +++ b/template/en/custom/global/user-error-page.html.tmpl @@ -33,7 +33,7 @@ admindocslinks = admindocslinks %] -
[% error_message.replace("\n\n", "
") FILTER none %]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 5004000b2..df88f91f1 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -293,12 +293,12 @@ document.changeform = document.[% cfname %]; show_attachment_flags = bug.show_attachment_flags %] - [% PROCESS comment_box %]
[% END %] diff --git a/template/en/default/global/code-error-page.html.tmpl b/template/en/default/global/code-error-page.html.tmpl deleted file mode 100644 index 31cc04dfa..000000000 --- a/template/en/default/global/code-error-page.html.tmpl +++ /dev/null @@ -1,83 +0,0 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Gervase Markham
- Sorry! [% terms.Bugzilla %] has suffered an internal error.
-- [% IF Param('report_code_errors_to_maintainer') %] - Error was reported automatically to instance maintainer [% Param('maintainer') %]. - So he probably knows about it and is already on charge. - [% ELSE %] - Please save this page and send it to [% Param('maintainer') %] with details - of what you were doing at the time this message appeared. - [% END %] -
[% error_message.replace("\n\n", "
") FILTER none %]
-We apologize for your inconvenience.
-[% error_message.replace("\n\n", "
") FILTER none %]
-- Please press Back and try again. -
- -[%# If a saved search fails, people want the ability to edit or delete it. - # This is the best way of getting information about that possible saved - # search from any error call location. %] - -[% namedcmd = Bugzilla.cgi.param("namedcmd") %] -[% sharer_id = Bugzilla.cgi.param("sharer_id") %] -[% IF namedcmd AND error != "missing_query" - AND error != "saved_search_used_by_whines" - AND !sharer_id %] -- Alternatively, you can - forget - - [% FOREACH q = Bugzilla.user.queries %] - [% IF q.name == namedcmd %] - or edit - [% END %] - [% END %] - - the saved search '[% namedcmd FILTER html %]'. -
-[% END %] - -[% PROCESS global/footer.html.tmpl %]