Bugzilla – Attachment 26080 Details for
Bug 11647
Subscribe to email notification for serials needs user login
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11647 : (follow-up) Test if user is logged in before proposing to subscribe or unscribe from serial routing list
Bug-11647--follow-up-Test-if-user-is-logged-in-bef.patch (text/plain), 4.38 KB, created by
Biblibre Sandboxes
on 2014-03-11 11:13:38 UTC
(
hide
)
Description:
Bug 11647 : (follow-up) Test if user is logged in before proposing to subscribe or unscribe from serial routing list
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2014-03-11 11:13:38 UTC
Size:
4.38 KB
patch
obsolete
>From 112c448bd4a7ab7ff24838de94720f595c69b0df Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Mon, 10 Mar 2014 17:07:07 +0100 >Subject: [PATCH] Bug 11647 : (follow-up) Test if user is logged in before proposing to subscribe or unscribe from serial routing list > >To test : >1) Search for a subscription with patron notification active >2) If you're not logged in, a message warns you that you must log in to subscribe to notification on new issues >3) If you log in, and have not yet subscribed to this routing list, you've got a link to subscribe >4) once you have subscribed, you've got a ling to unsubscribe >5) if you log out, you've got a message saying you must log in to subscribe >6) if you log in with another user, you've got the link to subscribe or unsubscribe depending on if he has already subscribed. > >Signed-off-by: remy juliette <remy.gonzalves@iepg.fr> >--- > .../prog/en/modules/opac-serial-issues.tt | 18 +++++++++++------- > opac/opac-serial-issues.pl | 18 +++++++++++------- > 2 files changed, 22 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt >index 546bc15..5d590a9 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt >@@ -113,14 +113,18 @@ > </p> > [% END %] > [% IF ( subscription_LOO.letter ) %] >- [% IF ( subscription_LOO.hasalert ) %] >- You have subscribed to email notification on new issues <a href="opac-alert-subscribe.pl?op=cancel&externalid=[% subscription_LOO.subscriptionid %]&alerttype=issue&biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Cancel email notification"> >- Cancel email notification >- </a> >+ [% IF ( loggedinusername ) %] >+ [% IF ( subscription_LOO.hasalert ) %] >+ You have subscribed to email notification on new issues <a href="opac-alert-subscribe.pl?op=cancel&externalid=[% subscription_LOO.subscriptionid %]&alerttype=issue&biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Cancel email notification"> >+ Cancel email notification >+ </a> >+ [% ELSE %] >+ <a href="opac-alert-subscribe.pl?externalid=[% subscription_LOO.subscriptionid %]&alerttype=issue&biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Subscribe to email notification on new issues"> >+ Subscribe to email notification on new issues >+ </a> >+ [% END %] > [% ELSE %] >- <a href="opac-alert-subscribe.pl?externalid=[% subscription_LOO.subscriptionid %]&alerttype=issue&biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Subscribe to email notification on new issues"> >- Subscribe to email notification on new issues >- </a> >+ You must log in if you want to subscribe to email notification on new issues > [% END %] > [% END %] > </div> >diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl >index b534974..edc6248 100755 >--- a/opac/opac-serial-issues.pl >+++ b/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; >+ } > } > } > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11647
:
24933
|
24979
|
26041
|
26079
|
26080
|
26186
|
26197
|
26198
|
26199
|
26228
|
26229
|
26230