]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 578335: The "Show next bug in my list" user pref either doesn't display the next...
authorFrédéric Buclin <LpSolit@gmail.com>
Fri, 16 Jul 2010 09:50:55 +0000 (11:50 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 16 Jul 2010 09:50:55 +0000 (11:50 +0200)
r/a=mkanat

Bugzilla/Search/Recent.pm
process_bug.cgi

index 79257a85195738d5133feb2d2b18f8459ec1b80b..6e24bd5bc7a62ce624afe822a143a95a3f96691b 100644 (file)
@@ -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
index 7126d5d8b7c4c88fa02bccc69e3d92537b40f80d..3e7f66c970a2748593d9387b31929d7333e7b475 100755 (executable)
@@ -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];