From 6a9394375fc4d0ee4c9dc472e096eb64d913bd75 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Fri, 16 Jul 2010 10:04:35 +0000 Subject: [PATCH] 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 git-svn-id: svn://10.0.0.236/trunk@260799 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/Search/Recent.pm | 2 +- mozilla/webtools/bugzilla/process_bug.cgi | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 49ba49b91ad..fdab7345505 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7378 \ No newline at end of file +7379 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/Search/Recent.pm b/mozilla/webtools/bugzilla/Bugzilla/Search/Recent.pm index 79257a85195..6e24bd5bc7a 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Search/Recent.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Search/Recent.pm @@ -32,7 +32,7 @@ use Bugzilla::Util; ############# use constant DB_TABLE => 'profile_search'; -use constant LIST_ORDER => 'id'; +use constant LIST_ORDER => 'id DESC'; use constant DB_COLUMNS => qw( id diff --git a/mozilla/webtools/bugzilla/process_bug.cgi b/mozilla/webtools/bugzilla/process_bug.cgi index 7126d5d8b7c..3e7f66c970a 100755 --- a/mozilla/webtools/bugzilla/process_bug.cgi +++ b/mozilla/webtools/bugzilla/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];