summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-10-14 02:31:45 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-14 02:31:45 +0200
commit3e06a51f060f168034ada88e40d9b60d51f8a244 (patch)
tree129362f12d91d4819168cd33e3955c67eb1ac876 /Bugzilla/Search
parent7995b869843b68a9a163ebcb4ddfc3ab40b27c8c (diff)
downloadbugzilla-3e06a51f060f168034ada88e40d9b60d51f8a244.tar.gz
bugzilla-3e06a51f060f168034ada88e40d9b60d51f8a244.tar.xz
Bug 600598: "Can't call method "bug_list" on unblessed reference" error thrown when editing a bug which is in the BUGLIST cookie but not in a recent saved search, with action="next_bug"
r/a=mkanat
Diffstat (limited to 'Bugzilla/Search')
-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 #
####################