Bugzilla – Attachment 44517 Details for
Bug 9303
relative's checkouts in the opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9303 [QA Followup] - Restore missing svc script
Bug-9303-QA-Followup---Restore-missing-svc-script.patch (text/plain), 2.39 KB, created by
Kyle M Hall (khall)
on 2015-11-05 14:04:48 UTC
(
hide
)
Description:
Bug 9303 [QA Followup] - Restore missing svc script
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-05 14:04:48 UTC
Size:
2.39 KB
patch
obsolete
>From ea88f5b995213a8ac05d01f8883c8a0e9e57dfb7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 3 Jun 2015 13:54:21 -0400 >Subject: [PATCH] Bug 9303 [QA Followup] - Restore missing svc script > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > opac/svc/patron/show_checkouts_to_relatives | 56 +++++++++++++++++++++++++++ > 1 files changed, 56 insertions(+), 0 deletions(-) > create mode 100755 opac/svc/patron/show_checkouts_to_relatives > >diff --git a/opac/svc/patron/show_checkouts_to_relatives b/opac/svc/patron/show_checkouts_to_relatives >new file mode 100755 >index 0000000..b59386e >--- /dev/null >+++ b/opac/svc/patron/show_checkouts_to_relatives >@@ -0,0 +1,56 @@ >+#!/usr/bin/perl >+ >+# Copyright 2014 ByWater Solutions >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use Modern::Perl; >+ >+use CGI; >+ >+use C4::Auth; >+use C4::Context; >+use Koha::Database; >+ >+use JSON qw( to_json ); >+ >+my $cgi = CGI->new(); >+ >+my $privacy_guarantor_checkouts = $cgi->param('privacy_guarantor_checkouts'); >+ >+my ( $userid, $cookie, $sessionID, $flags ) = checkauth( $cgi, 1, {}, 'opac' ); >+ >+my $borrowernumber = C4::Context->userenv ? C4::Context->userenv->{number} : undef; >+ >+my $success = 0; >+if ( $borrowernumber && defined($privacy_guarantor_checkouts) ) { >+ my $patron = Koha::Database->new()->schema()->resultset('Borrower')->find($borrowernumber); >+ >+ $success = $patron->update( { privacy_guarantor_checkouts => $privacy_guarantor_checkouts } ); >+} >+ >+binmode STDOUT, ":encoding(UTF-8)"; >+print $cgi->header( >+ -type => 'application/json', >+ -charset => 'UTF-8' >+); >+ >+print to_json( >+ { >+ success => $success ? 1 : 0, >+ privacy_guarantor_checkouts => $privacy_guarantor_checkouts, >+ } >+); >-- >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 9303
:
22757
|
22770
|
22771
|
22772
|
22783
|
22789
|
22790
|
22809
|
22966
|
22967
|
22968
|
22974
|
22975
|
23086
|
23087
|
23088
|
23089
|
23090
|
23525
|
23526
|
23527
|
24009
|
24010
|
24011
|
24773
|
24774
|
24775
|
24776
|
25008
|
25584
|
25585
|
25586
|
27537
|
27538
|
27539
|
27540
|
27541
|
27542
|
27543
|
27698
|
27699
|
28153
|
28154
|
28155
|
28156
|
28157
|
28158
|
28159
|
28160
|
28161
|
28912
|
29171
|
29172
|
29215
|
29286
|
29287
|
29288
|
29289
|
29290
|
29299
|
29302
|
29303
|
29304
|
29932
|
29933
|
29934
|
29935
|
29936
|
29937
|
30287
|
30288
|
30289
|
30297
|
30298
|
30299
|
30300
|
32053
|
32054
|
32055
|
33049
|
34629
|
34630
|
34631
|
34632
|
34633
|
35519
|
35520
|
35521
|
35522
|
35523
|
35524
|
35525
|
35526
|
35527
|
35528
|
35529
|
35530
|
35531
|
35532
|
35678
|
35679
|
35680
|
35681
|
35682
|
35683
|
35684
|
35686
|
35687
|
35688
|
35689
|
35690
|
35691
|
35832
|
36287
|
36288
|
36289
|
37110
|
37111
|
37112
|
38264
|
38265
|
38266
|
38267
|
38328
|
38329
|
38330
|
38331
|
38446
|
38447
|
38448
|
38449
|
38450
|
38820
|
38821
|
38822
|
38823
|
38824
|
39042
|
39043
|
39044
|
39045
|
39046
|
39047
|
39048
|
39811
|
39817
|
39818
|
39819
|
39820
|
39821
|
39822
|
39823
|
44430
|
44431
|
44432
|
44433
|
44434
|
44435
|
44436
|
44511
|
44512
|
44513
|
44514
|
44515
|
44516
|
44517
|
46136
|
46137
|
46138
|
46139
|
46140
|
46141
|
46142