Bugzilla – Attachment 44656 Details for
Bug 14257
Add show_extended_attributes to ILS-DI call GetPatronInfo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14257 - Add show_attributes to GetPatronInfo
Bug-14257---Add-showattributes-to-GetPatronInfo.patch (text/plain), 2.00 KB, created by
Martin Persson
on 2015-11-09 15:11:59 UTC
(
hide
)
Description:
Bug 14257 - Add show_attributes to GetPatronInfo
Filename:
MIME Type:
Creator:
Martin Persson
Created:
2015-11-09 15:11:59 UTC
Size:
2.00 KB
patch
obsolete
>From dacb9f7f6184305e63b3ed1076d0df6b51159f82 Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Mon, 9 Nov 2015 14:34:40 +0100 >Subject: [PATCH] Bug 14257 - Add show_attributes to GetPatronInfo > >This patch adds the ability to query the extended patron >attributes via the ILSDI web service's GetPatronInfo service. > >Example: ilsdi.pl?service=GetPatronInfo&patron_id=3&show_attributes=1 > >A new element <attributes> will be added if there >are any attributes available from the database. > >We need to discuss the security implications of showing the >attributes. At present it will allow querying of non-public >(OPAC-visible) information. We might want to change this. > >Sponsored-By: Halland County Library >--- > C4/ILSDI/Services.pm | 6 ++++++ > opac/ilsdi.pl | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index e69c070..b1db742 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -34,6 +34,7 @@ use HTML::Entities; > use CGI qw ( -utf8 ); > use DateTime; > use C4::Auth; >+use C4::Members::Attributes qw(GetBorrowerAttributes); > > =head1 NAME > >@@ -428,6 +429,11 @@ sub GetPatronInfo { > $borrower->{'loans'}->{'loan'} = $issues; > } > >+ if ( $cgi->param('show_attributes') eq "1" ) { >+ my $attrs = GetBorrowerAttributes( $borrowernumber, 0, 1 ); >+ $borrower->{'attributes'} = $attrs; >+ } >+ > return $borrower; > } > >diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl >index c53acc6..53f3c02 100755 >--- a/opac/ilsdi.pl >+++ b/opac/ilsdi.pl >@@ -105,7 +105,7 @@ my %optional = ( > 'GetAuthorityRecords' => ['schema'], > 'LookupPatron' => ['id_type'], > 'AuthenticatePatron' => [], >- 'GetPatronInfo' => [ 'show_contact', 'show_fines', 'show_holds', 'show_loans' ], >+ 'GetPatronInfo' => [ 'show_contact', 'show_fines', 'show_holds', 'show_loans', 'show_attributes' ], > 'GetPatronStatus' => [], > 'GetServices' => [], > 'RenewLoan' => ['desired_due_date'], >-- >2.1.4
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 14257
:
44656
|
44707
|
44864
|
44865
|
49579
|
49580
|
49581
|
49669
|
49696
|
49697
|
49698