Bugzilla – Attachment 100582 Details for
Bug 24776
Remove useless Borrowers Template Toolkit plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm
Bug-24776-Remove-file-KohaTemplatePluginBorrowersp.patch (text/plain), 2.46 KB, created by
Jonathan Druart
on 2020-03-11 15:27:46 UTC
(
hide
)
Description:
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-11 15:27:46 UTC
Size:
2.46 KB
patch
obsolete
>From 931b1d7226be58a57a8a4f30704e74714da8d4ed Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 2 Mar 2020 17:35:53 +0300 >Subject: [PATCH] Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Template/Plugin/Borrowers.pm | 60 ------------------------------- > 1 file changed, 60 deletions(-) > delete mode 100644 Koha/Template/Plugin/Borrowers.pm > >diff --git a/Koha/Template/Plugin/Borrowers.pm b/Koha/Template/Plugin/Borrowers.pm >deleted file mode 100644 >index 1c48487e92..0000000000 >--- a/Koha/Template/Plugin/Borrowers.pm >+++ /dev/null >@@ -1,60 +0,0 @@ >-package Koha::Template::Plugin::Borrowers; >- >-# Copyright ByWater Solutions 2013 >-# Copyright Equinox Software, Inc. 2014 >- >-# 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( Template::Plugin ); >- >-use Koha::Patron::Debarments qw(); >-use Koha::Patrons; >- >-=pod >- >-This plugin is a home for various patron related Template Toolkit functions >-to help streamline Koha and to move logic from the Perl code into the >-Templates when it makes sense to do so. >- >-To use, first, include the line '[% USE Borrowers %]' at the top >-of the template to enable the plugin. >- >-For example: [% IF Borrowers.IsDebarred( borrower ) %] >-removes the necessity of setting a template variable in Perl code to >-find out if a patron is restricted even if that variable is not evaluated >-in any way in the script. >- >-=cut >- >-sub IsDebarred { >- my ( $self, $borrower ) = @_; >- >- return unless $borrower; >- >- return Koha::Patrons->find( $borrower->{borrowernumber} )->is_debarred; >-} >- >-sub HasOverdues { >- my ( $self, $borrowernumber ) = @_; >- >- return unless $borrowernumber; >- >- return Koha::Patrons->find( $borrowernumber )->has_overdues; >-} >- >-1; >-- >2.20.1
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 24776
:
99921
|
99922
|
99925
|
100411
|
100412
|
100413
|
100580
|
100581
| 100582