Bugzilla – Attachment 89355 Details for
Bug 22849
Data shared without agreement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22849: Do not share data (Mana) without agreement
Bug-22849-Do-not-share-data-Mana-without-agreement.patch (text/plain), 2.12 KB, created by
Jonathan Druart
on 2019-05-04 16:43:43 UTC
(
hide
)
Description:
Bug 22849: Do not share data (Mana) without agreement
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-04 16:43:43 UTC
Size:
2.12 KB
patch
obsolete
>From 4a5191476a1e881d6b8caf626594ea76d1ccb81b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 4 May 2019 12:33:34 -0400 >Subject: [PATCH] Bug 22849: Do not share data (Mana) without agreement > >A couple of things wrong in serials/subscription-add.pl > >1. >447 if ( defined( $query->param('mana_id') ) ) { > >It's always defined, you wanted to test with "" > >2. >375 if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){ > >Mana == 2 == let me think about it >=> I am not expecting to reach Koha::SharedContent in that case > >So we are sharing data whereas the library did not decide yet! > >Test plan: >You need to be familiar you Mana to test this patch. > >JD: I did not test this patch >--- > serials/subscription-add.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 9e503e55ae..ebc19a05e9 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -377,7 +377,7 @@ sub redirect_add_subscription { > $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate, > $skip_serialseq, $itemtype, $previousitemtype, $mana_id > ); >- if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){ >+ if ( (C4::Context->preference('Mana') == 1) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){ > my $result = Koha::SharedContent::send_entity( $query->param('mana_language') || '', $loggedinuser, $subscriptionid, 'subscription'); > $template->param( mana_msg => $result->{msg} ); > } >@@ -465,7 +465,7 @@ sub redirect_mod_subscription { > my $skip_serialseq = $query->param('skip_serialseq'); > > my $mana_id; >- if ( defined( $query->param('mana_id') ) ) { >+ if ( $query->param('mana_id') ne "" ) { > $mana_id = $query->param('mana_id'); > Koha::SharedContent::increment_entity_value("subscription",$mana_id, "nbofusers"); > } >-- >2.11.0
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 22849
:
89354
|
89355
|
89577
|
89689