diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-16 11:49:08 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-07-16 11:49:08 +0200 |
commit | bb0ccde864424d776d33bd8a4b704f720b090017 (patch) | |
tree | fbcad11d9bbb8bc8970fbf405c7c261ec72cd878 /process_bug.cgi | |
parent | Bug 578258: Calling votes.cgi with no arguments should either display the use... (diff) | |
download | bugzilla-bb0ccde864424d776d33bd8a4b704f720b090017.tar.gz bugzilla-bb0ccde864424d776d33bd8a4b704f720b090017.tar.bz2 bugzilla-bb0ccde864424d776d33bd8a4b704f720b090017.zip |
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
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 7126d5d8b..3e7f66c97 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -189,13 +189,11 @@ $vars->{'title_tag'} = "bug_processed"; my $action; 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') { - my @bug_list; - if ($cgi->cookie("BUGLIST")) { - @bug_list = split(/:/, $cgi->cookie("BUGLIST")); - } + my $bug_list_obj = $user->recent_search_for($first_bug); + my @bug_list = $bug_list_obj ? @{$bug_list_obj->bug_list} : (); my $cur = firstidx { $_ eq $cgi->param('id') } @bug_list; if ($cur >= 0 && $cur < $#bug_list) { my $next_bug_id = $bug_list[$cur + 1]; |