# Retrieve the users cached records AKA 'My List'
# Returns an empty list if there are no cached records
sub fetch_mylist {
- my $self = shift;
+ my ($self, $with_marc_xml) = @_;
my $list = [];
my $cache_key = $self->cgi->cookie(COOKIE_ANON_CACHE);
}
$self->apache->log->info("Found anon-cache list [@$list]");
+ my $marc_xml;
+ if ($with_marc_xml) {
+ $marc_xml = $self->fetch_marc_xml_by_id($list);
+ }
- return ($cache_key, $list);
+ return ($cache_key, $list, $marc_xml);
}
);
}
+sub load_mylist {
+ my ($self) = shift;
+ (undef, $self->ctx->{mylist}, $self->ctx->{mylist_marc_xml}) =
+ $self->fetch_mylist(1);
+
+ return Apache2::Const::OK;
+}
+
1;