Bugzilla – Attachment 175828 Details for
Bug 35604
ILL - Allow for automatic backend selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35604: New Backends.pm class. installed_backends method
Bug-35604-New-Backendspm-class-installedbackends-m.patch (text/plain), 2.07 KB, created by
Pedro Amorim
on 2024-12-20 12:11:10 UTC
(
hide
)
Description:
Bug 35604: New Backends.pm class. installed_backends method
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-12-20 12:11:10 UTC
Size:
2.07 KB
patch
obsolete
>From da6a74f66c78663896e84fcdc527e28b6f1cc9f7 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 18 Dec 2023 16:11:01 -0100 >Subject: [PATCH] Bug 35604: New Backends.pm class. installed_backends method > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/ILL/Backends.pm | 74 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 74 insertions(+) > create mode 100644 Koha/ILL/Backends.pm > >diff --git a/Koha/ILL/Backends.pm b/Koha/ILL/Backends.pm >new file mode 100644 >index 00000000000..eec8d278635 >--- /dev/null >+++ b/Koha/ILL/Backends.pm >@@ -0,0 +1,74 @@ >+package Koha::ILL::Backends; >+ >+# Copyright PTFS Europe 2023 >+# >+# 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, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use base qw(Koha::Objects); >+ >+=head1 NAME >+ >+Koha::ILL::Backends - Koha Illbackends Object class >+ >+=head2 Class methods >+ >+=head3 new >+ >+New ILL Backend >+ >+=cut >+ >+sub new { >+ my $class = shift; >+ my $self = {}; >+ return bless $self, $class; >+} >+ >+=head3 installed_backends >+ >+Return a list of installed backends. >+ >+=cut >+ >+sub installed_backends { >+ my $backends = Koha::ILL::Request::Config->new->available_backends; >+ my @installed = grep { !/Standard/ } @{$backends}; >+ return \@installed; >+} >+ >+=head2 Internal methods >+ >+=head3 _type >+ >+ my $type = Koha::ILL::Backend->_type; >+ >+Return this object's type >+ >+=cut >+ >+sub _type { >+ return 'Illbackend'; >+} >+ >+=head1 AUTHOR >+ >+Pedro Amorim <pedro.amorim@ptfs-europe.com> >+ >+=cut >+ >+1; >-- >2.43.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 35604
:
160035
|
164883
|
164884
|
164885
|
164886
|
164887
|
164888
|
165135
|
165164
|
165165
|
165294
|
165295
|
165296
|
165297
|
165298
|
165299
|
165300
|
166897
|
166898
|
166899
|
166900
|
166901
|
166902
|
166903
|
166995
|
166996
|
166997
|
166998
|
166999
|
167000
|
167001
|
171326
|
171327
|
171328
|
171329
|
171330
|
171331
|
171332
|
174515
|
174516
|
174517
|
174518
|
174519
|
174520
|
174521
|
174522
|
174524
|
174792
|
175828
|
175829
|
175830
|
175831
|
175832
|
175833
|
175834
|
175835
|
175836
|
176036
|
176261
|
176262
|
176263
|
176264
|
176265
|
176266
|
176267
|
176268
|
176269
|
176270
|
176572
|
176662
|
176681
|
176682
|
176683
|
176684
|
176685
|
176686
|
176687
|
176688
|
176689
|
176690
|
176691
|
176692