summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search/Recent.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Search/Recent.pm')
-rw-r--r--Bugzilla/Search/Recent.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla/Search/Recent.pm b/Bugzilla/Search/Recent.pm
index 6e24bd5bc..d7d595ecc 100644
--- a/Bugzilla/Search/Recent.pm
+++ b/Bugzilla/Search/Recent.pm
@@ -90,6 +90,18 @@ sub check {
return $search;
}
+sub new_from_cookie {
+ my ($invocant, $bug_ids) = @_;
+ my $class = ref($invocant) || $invocant;
+
+ my $search = { id => 'cookie',
+ user_id => Bugzilla->user->id,
+ bug_list => join(',', @$bug_ids) };
+
+ bless $search, $class;
+ return $search;
+}
+
####################
# Simple Accessors #
####################