Commit bb0ccde8 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 578335: The "Show next bug in my list" user pref either doesn't display the…

Bug 578335: The "Show next bug in my list" user pref either doesn't display the next bug or display one from the wrong buglist r/a=mkanat
parent 7edcb0dc
...@@ -32,7 +32,7 @@ use Bugzilla::Util; ...@@ -32,7 +32,7 @@ use Bugzilla::Util;
############# #############
use constant DB_TABLE => 'profile_search'; use constant DB_TABLE => 'profile_search';
use constant LIST_ORDER => 'id'; use constant LIST_ORDER => 'id DESC';
use constant DB_COLUMNS => qw( use constant DB_COLUMNS => qw(
id id
......
...@@ -189,13 +189,11 @@ $vars->{'title_tag'} = "bug_processed"; ...@@ -189,13 +189,11 @@ $vars->{'title_tag'} = "bug_processed";
my $action; my $action;
if (defined $cgi->param('id')) { if (defined $cgi->param('id')) {
$action = Bugzilla->user->settings->{'post_bug_submit_action'}->{'value'}; $action = $user->settings->{'post_bug_submit_action'}->{'value'};
if ($action eq 'next_bug') { if ($action eq 'next_bug') {
my @bug_list; my $bug_list_obj = $user->recent_search_for($first_bug);
if ($cgi->cookie("BUGLIST")) { my @bug_list = $bug_list_obj ? @{$bug_list_obj->bug_list} : ();
@bug_list = split(/:/, $cgi->cookie("BUGLIST"));
}
my $cur = firstidx { $_ eq $cgi->param('id') } @bug_list; my $cur = firstidx { $_ eq $cgi->param('id') } @bug_list;
if ($cur >= 0 && $cur < $#bug_list) { if ($cur >= 0 && $cur < $#bug_list) {
my $next_bug_id = $bug_list[$cur + 1]; my $next_bug_id = $bug_list[$cur + 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment