@@ -, +, @@ --- .../prog/en/modules/opac-serial-issues.tt | 18 +++++++++++------- opac/opac-serial-issues.pl | 18 +++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt @@ -113,14 +113,18 @@

[% END %] [% IF ( subscription_LOO.letter ) %] - [% IF ( subscription_LOO.hasalert ) %] - You have subscribed to email notification on new issues - Cancel email notification - + [% IF ( loggedinusername ) %] + [% IF ( subscription_LOO.hasalert ) %] + You have subscribed to email notification on new issues + Cancel email notification + + [% ELSE %] + + Subscribe to email notification on new issues + + [% END %] [% ELSE %] - - Subscribe to email notification on new issues - + You must log in if you want to subscribe to email notification on new issues [% END %] [% END %] --- a/opac/opac-serial-issues.pl +++ a/opac/opac-serial-issues.pl @@ -62,9 +62,11 @@ if ( $selectview eq "full" ) { } # 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; + } } } @@ -100,10 +102,12 @@ else { 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; + } } } --