Bugzilla – Attachment 162896 Details for
Bug 36270
Remove special handling for <<borrower-attribute:CODE>>
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36270: Remove borrower-attribute:code from <<>> notices
Bug-36270-Remove-borrower-attributecode-from--noti.patch (text/plain), 2.17 KB, created by
Martin Renvoize (ashimema)
on 2024-03-07 11:03:02 UTC
(
hide
)
Description:
Bug 36270: Remove borrower-attribute:code from <<>> notices
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-07 11:03:02 UTC
Size:
2.17 KB
patch
obsolete
>From 7536b7af1c62df53d0a8244bb74c46a4d8b50352 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 7 Mar 2024 11:02:01 +0000 >Subject: [PATCH] Bug 36270: Remove borrower-attribute:code from <<>> notices > >We need to replace this with a TT alternative however :| >--- > C4/Letters.pm | 20 -------------------- > tools/letter.pl | 12 ------------ > 2 files changed, 32 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index a0404ac7075..fab7dc145e0 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -873,26 +873,6 @@ sub _parseletter { > } > } > >- if ($table eq 'borrowers' && $letter->{content}) { >- my $patron = Koha::Patrons->find( $values->{borrowernumber} ); >- if ( $patron ) { >- my $attributes = $patron->extended_attributes; >- my %attr; >- while ( my $attribute = $attributes->next ) { >- my $code = $attribute->code; >- my $val = $attribute->description; # FIXME - we always display intranet description here! >- $val =~ s/\p{P}(?=$)//g if $val; >- next unless $val gt ''; >- $attr{$code} ||= []; >- push @{ $attr{$code} }, $val; >- } >- while ( my ($code, $val_ar) = each %attr ) { >- my $replacefield = "<<borrower-attribute:$code>>"; >- my $replacedby = join ',', @$val_ar; >- $letter->{content} =~ s/$replacefield/$replacedby/g; >- } >- } >- } > return $letter; > } > >diff --git a/tools/letter.pl b/tools/letter.pl >index 0ecab147b0e..ea1e3fcd372 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -517,17 +517,5 @@ sub get_columns_for { > text => $table_prefix . $row->{Field}, > } > } >- if ($table eq 'borrowers') { >- my $attribute_types = Koha::Patron::Attribute::Types->search( >- {}, >- { order_by => 'code' }, >- ); >- while ( my $at = $attribute_types->next ) { >- push @fields, { >- value => "borrower-attribute:" . $at->code, >- text => "attribute:" . $at->code, >- } >- } >- } > return @fields; > } >-- >2.44.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 36270
: 162896