if ( $selectview eq "full" ) {
( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "opac-full-serial-issues.tmpl",
+ template_name => "opac-full-serial-issues.tt",
query => $query,
type => "opac",
authnotrequired => 1,
}
# now, check is there is an alert subscription for one of the subscriptions
- foreach (@$subscriptions) {
- if (getalert($loggedinuser,'issue',$_->{subscriptionid})) {
- $_->{hasalert} = 1;
+ if ($loggedinuser) {
+ foreach (@$subscriptions) {
+ if (getalert($loggedinuser,'issue',$_->{subscriptionid})) {
+ $_->{hasalert} = 1;
+ }
}
}
else {
( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "opac-serial-issues.tmpl",
+ template_name => "opac-serial-issues.tt",
query => $query,
type => "opac",
authnotrequired => 1,
my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
# now, check is there is an alert subscription for one of the subscriptions
- foreach (@$subscriptions) {
- my $subscription = getalert($loggedinuser,'issue',$_->{subscriptionid});
- if (@$subscription[0]) {
- $_->{hasalert} = 1;
+ if ($loggedinuser){
+ foreach (@$subscriptions) {
+ my $subscription = getalert($loggedinuser,'issue',$_->{subscriptionid});
+ if (@$subscription[0]) {
+ $_->{hasalert} = 1;
+ }
}
}