summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-07-26 06:03:28 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-07-26 06:03:28 +0200
commitb46b9a026a3215ab086092a6d34188b3cd52baed (patch)
tree712ee05245eb929e2539b813bf61f9143d68b59b
parent10e4e28f963ddba0ec592543cc7b9243ee59ea4e (diff)
parentc1a71191995c59f93f4e11906fcec41602e40178 (diff)
downloadbugzilla-b46b9a026a3215ab086092a6d34188b3cd52baed.tar.gz
bugzilla-b46b9a026a3215ab086092a6d34188b3cd52baed.tar.xz
merged with bugzilla/4.2
-rw-r--r--Bugzilla/Search.pm18
-rw-r--r--Bugzilla/User/Setting.pm4
-rwxr-xr-xbuglist.cgi4
-rwxr-xr-xemail_in.pl3
-rw-r--r--template/en/default/admin/params/editparams.html.tmpl11
-rw-r--r--template/en/default/bug/dependency-tree.html.tmpl26
6 files changed, 48 insertions, 18 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 9b92b57d1..8e70a9721 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -822,28 +822,38 @@ sub _add_extra_column {
}
# These are the columns that we're going to be actually SELECTing.
+sub _display_columns {
+ my ($self) = @_;
+ # Do not alter the list specified here at all, even if they are duplicated.
+ # Those are passed by the caller, and the caller expects to get them back
+ # in the exact same order.
+ $self->{display_columns} ||= [$self->_input_columns, $self->_extra_columns];
+ return @{ $self->{display_columns} };
+}
+
+# These are the columns that are involved in the query.
sub _select_columns {
my ($self) = @_;
return @{ $self->{select_columns} } if $self->{select_columns};
my @select_columns;
- foreach my $column ($self->_input_columns, $self->_extra_columns) {
+ foreach my $column ($self->_display_columns) {
if (my $add_first = COLUMN_DEPENDS->{$column}) {
push(@select_columns, @$add_first);
}
push(@select_columns, $column);
}
-
+ # Remove duplicated columns.
$self->{select_columns} = [uniq @select_columns];
return @{ $self->{select_columns} };
}
-# This takes _select_columns and translates it into the actual SQL that
+# This takes _display_columns and translates it into the actual SQL that
# will go into the SELECT clause.
sub _sql_select {
my ($self) = @_;
my @sql_fields;
- foreach my $column ($self->_select_columns) {
+ foreach my $column ($self->_display_columns) {
my $alias = $column;
# Aliases cannot contain dots in them. We convert them to underscores.
$alias =~ s/\./_/g;
diff --git a/Bugzilla/User/Setting.pm b/Bugzilla/User/Setting.pm
index 78e64c96b..958a95580 100644
--- a/Bugzilla/User/Setting.pm
+++ b/Bugzilla/User/Setting.pm
@@ -391,10 +391,10 @@ Description: Determines if a given setting exists in the database.
Params: C<$setting_name> - string - the setting name
Returns: boolean - true if the setting already exists in the DB.
-=back
-
=end private
+=back
+
=head1 METHODS
=over 4
diff --git a/buglist.cgi b/buglist.cgi
index 2891b5dea..b5872e05d 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -453,7 +453,9 @@ if ($cmdtype eq "dorem") {
# Generate and return the UI (HTML page) from the appropriate template.
$vars->{'message'} = "buglist_query_gone";
$vars->{'namedcmd'} = $qname;
- $vars->{'url'} = "buglist.cgi?newquery=" . url_quote($buffer) . "&cmdtype=doit&remtype=asnamed&newqueryname=" . url_quote($qname);
+ $vars->{'url'} = "buglist.cgi?newquery=" . url_quote($buffer)
+ . "&cmdtype=doit&remtype=asnamed&newqueryname=" . url_quote($qname)
+ . "&token=" . url_quote(issue_hash_token(['savedsearch']));
$template->process("global/message.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
diff --git a/email_in.pl b/email_in.pl
index ed4cf9a04..34e57c90c 100755
--- a/email_in.pl
+++ b/email_in.pl
@@ -235,7 +235,8 @@ sub process_bug {
my $added_comment;
if (trim($fields{'comment'})) {
- $added_comment = $bug->comments->[-1];
+ # The "old" bug object doesn't contain the comment we just added.
+ $added_comment = Bugzilla::Bug->check($bug_id)->comments->[-1];
}
return ($bug, $added_comment);
}
diff --git a/template/en/default/admin/params/editparams.html.tmpl b/template/en/default/admin/params/editparams.html.tmpl
index fd38d65f0..14fba5866 100644
--- a/template/en/default/admin/params/editparams.html.tmpl
+++ b/template/en/default/admin/params/editparams.html.tmpl
@@ -93,11 +93,12 @@
[% ELSE %]
<div class="contribute"><strong>Note:</strong>
- [%+ terms.Bugzilla %] is developed entirely by volunteers. The
- best way to give back to the [% terms.Bugzilla %] project is
- to <a href="http://www.bugzilla.org/contribute/">contribute</a>
- yourself! You don't have to be a programmer to contribute, there are
- lots of things that we need.
+ B[% %]ugzilla is developed entirely by volunteers.
+ The best way to give back to the B[% %]ugzilla project is to
+ <a href="http://www.bugzilla.org/contribute/">contribute</a>
+ yourself!
+ You don't have to be a programmer to contribute, there are lots of
+ things that we need.
</div>
<p>
diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl
index 10279f9b2..17f00803f 100644
--- a/template/en/default/bug/dependency-tree.html.tmpl
+++ b/template/en/default/bug/dependency-tree.html.tmpl
@@ -81,11 +81,27 @@
[% END %]
</h3>
[% IF ids.size %]
- ([% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%]
- <a href="buglist.cgi?bug_id=[% ids.join(",") %]">view as [% terms.bug %] list</a>
- [% IF user.in_group('editbugs') && ids.size > 1 %]
- | <a href="buglist.cgi?bug_id=[% ids.join(",") %]&amp;tweak=1">change several</a>
- [% END %])
+ [%# 27 chars is the length of buglist.cgi?tweak=&bug_id=" %]
+ [% use_post = (ids.join(",").length > constants.CGI_URI_LIMIT - 27 ) ? 1 : 0 %]
+ [% IF use_post %]
+ <form action="buglist.cgi" method="post">
+ <input type="hidden" name="bug_id" value="[% ids.join(",") %]">
+ [% END %]
+
+ [% IF maxdepth -%]Up to [% maxdepth %] level[% "s" IF maxdepth > 1 %] deep | [% END -%]
+ [% IF use_post %]
+ <button>view as [% terms.bug %] list</button>
+ [% IF user.in_group('editbugs') && ids.size > 1 %]
+ | <button type="submit" name="tweak" value="1">change several</button>
+ [% END %]
+ </form>
+ [% ELSE %]
+ <a href="buglist.cgi?bug_id=[% ids.join(",") %]">view as [% terms.bug %] list</a>
+ [% IF user.in_group('editbugs') && ids.size > 1 %]
+ | <a href="buglist.cgi?bug_id=[% ids.join(",") %]&amp;tweak=1">change several</a>
+ [% END %]
+ [% END %]
+
<ul class="tree">
[% INCLUDE display_tree tree=$tree_name %]
</ul>