Bugzilla – Attachment 68988 Details for
Bug 7317
Add an Interlibrary Loan Module to Circulation and OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7317: Add partner_code checks to abot page
Bug-7317-Add-partnercode-checks-to-abot-page.patch (text/plain), 3.57 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-11-06 17:34:27 UTC
(
hide
)
Description:
Bug 7317: Add partner_code checks to abot page
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-11-06 17:34:27 UTC
Size:
3.57 KB
patch
obsolete
>From 1c15050d3976cfe76a543f90c0fc956fb996aead Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 6 Nov 2017 12:45:24 -0300 >Subject: [PATCH] Bug 7317: Add partner_code checks to abot page > >This patch adds checks to the configured (or fallback) partner_code. >It produces two different warnings: > >- Configured partner_code doesn't match an existing patron category >code. >- partner_code is not defined, a fallback to ILLLIBS is done > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > about.pl | 20 +++++++++++++++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 14 +++++++++++++- > 2 files changed, 32 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index a7daa3780c..5e481738c7 100755 >--- a/about.pl >+++ b/about.pl >@@ -35,6 +35,7 @@ use C4::Installer; > > use Koha; > use Koha::Acquisition::Currencies; >+use Koha::Patron::Categories; > use Koha::Patrons; > use Koha::Caches; > use Koha::Config::SysPrefs; >@@ -261,16 +262,33 @@ if ( !defined C4::Context->config('use_zebra_facets') ) { > } > } > >+# ILL module checks > if ( C4::Context->preference('ILLModule') ) { > my $warnILLConfiguration = 0; >+ my $ill_config_from_file = C4::Context->config("interlibrary_loans"); >+ my $ill_config = Koha::Illrequest::Config->new; >+ > my $available_ill_backends = >- ( scalar @{ Koha::Illrequest::Config->new->available_backends } > 0 ); >+ ( scalar @{ $ill_config->available_backends } > 0 ); > >+ # Check backends > if ( !$available_ill_backends ) { > $template->param( no_ill_backends => 1 ); > $warnILLConfiguration = 1; > } > >+ # Check partner_code >+ if ( !Koha::Patron::Categories->find($ill_config->partner_code) ) { >+ $template->param( ill_partner_code_doesnt_exist => $ill_config->partner_code ); >+ $warnILLConfiguration = 1; >+ } >+ >+ if ( !$ill_config_from_file->{partner_code} ) { >+ # partner code not defined >+ $template->param( ill_partner_code_not_defined => 1 ); >+ $warnILLConfiguration = 1; >+ } >+ > $template->param( warnILLConfiguration => $warnILLConfiguration ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 42b29743f8..7ce8c89d30 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -227,9 +227,21 @@ > </td></tr> > [% END %] > [% IF warnILLConfiguration %] >+ [% IF no_ill_backends %] > <tr><th scope="row"><b>Warning</b> </th><td> >- [% IF no_ill_backends %]The ILL module is enabled, but there are no backends available.[%END %] >+ The ILL module is enabled, but there are no backends available. > </td></tr> >+ [% END %] >+ [% IF ill_partner_code_not_defined %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The ILL module is enabled, but no 'partner_code' defined in koha-conf.xml. Falling back to the hardcoded 'ILLLIBS'. >+ </td></tr> >+ [%END %] >+ [% IF ill_partner_code_doesnt_exist %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The ILL module is enabled, but the configured 'partner_code' ([% ill_partner_code_doesnt_exist %]) is not defined on the system. >+ </td></tr> >+ [% END %] > [% END %] > </table> > [% END %] >-- >2.15.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 7317
:
59893
|
59894
|
59895
|
59920
|
60485
|
60486
|
60487
|
60488
|
63081
|
63082
|
63083
|
63084
|
63085
|
63086
|
63087
|
63088
|
63089
|
63090
|
63113
|
63175
|
63176
|
63354
|
63421
|
63472
|
63475
|
65469
|
65470
|
65471
|
65472
|
65473
|
65474
|
65475
|
65476
|
66266
|
67242
|
67243
|
67244
|
67245
|
67246
|
67247
|
67248
|
67249
|
67250
|
67251
|
67252
|
67253
|
67254
|
67255
|
67256
|
67257
|
67258
|
67259
|
67260
|
67261
|
67262
|
67263
|
67264
|
67281
|
67282
|
67283
|
67284
|
67285
|
67286
|
67287
|
67288
|
67289
|
67290
|
67291
|
67292
|
67293
|
67294
|
67295
|
67296
|
67297
|
67298
|
67299
|
67300
|
67301
|
67302
|
67303
|
68185
|
68186
|
68328
|
68391
|
68406
|
68407
|
68408
|
68409
|
68418
|
68444
|
68445
|
68483
|
68484
|
68485
|
68487
|
68516
|
68517
|
68518
|
68519
|
68520
|
68521
|
68522
|
68523
|
68524
|
68525
|
68542
|
68543
|
68544
|
68545
|
68546
|
68547
|
68548
|
68549
|
68550
|
68551
|
68552
|
68558
|
68559
|
68560
|
68561
|
68562
|
68563
|
68564
|
68565
|
68566
|
68567
|
68858
|
68874
|
68877
|
68878
|
68885
|
68886
|
68921
|
68922
|
68926
|
68927
|
68928
|
68929
|
68931
|
68932
|
68933
| 68988 |
68989
|
68999
|
69000
|
69006
|
69008
|
69009
|
69012
|
69014
|
69044
|
69045
|
69046
|
69056
|
69059
|
69060
|
69061
|
69063
|
69064
|
69065
|
69066
|
69069
|
69070
|
69071
|
69074