Bugzilla – Attachment 25899 Details for
Bug 9016
Multi transport types for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9016: FIX GetLetters should return all letters
Bug-9016-FIX-GetLetters-should-return-all-letters.patch (text/plain), 1.65 KB, created by
Jonathan Druart
on 2014-03-06 14:40:13 UTC
(
hide
)
Description:
Bug 9016: FIX GetLetters should return all letters
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-03-06 14:40:13 UTC
Size:
1.65 KB
patch
obsolete
>From f1c08873f17f880029545abe2abbcd527ef75354 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 6 Mar 2014 15:18:12 +0100 >Subject: [PATCH] Bug 9016: FIX GetLetters should return all letters > >GetLetters only returns letters with a mtt = email. It should return all >letter codes in the DB. > >The message_transport_type parameter is never used. > >To reproduce the issue: >Create a notice with a sms template and no email template. >Go on the overdue rules configucation page. >The notice does not appear in the notice list. >--- > C4/Letters.pm | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 4345153..f4269e3 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -97,18 +97,17 @@ $template->param(LETTERLOOP => \@letterloop); > sub GetLetters { > > # returns a reference to a hash of references to ALL letters... >- my ( $cat, $message_transport_type ) = @_; >- $message_transport_type ||= 'email'; >+ my ( $cat ) = @_; > my %letters; > my $dbh = C4::Context->dbh; > my $sth; > my $query = q{ >- SELECT * FROM letter WHERE >+ SELECT * FROM letter WHERE 1 > }; >- $query .= q{ module = ? AND } if defined $cat; >- $query .= q{ message_transport_type = ? ORDER BY name}; >+ $query .= q{ AND module = ? } if defined $cat; >+ $query .= q{ GROUP BY code ORDER BY name}; > $sth = $dbh->prepare($query); >- $sth->execute((defined $cat ? $cat : ()), $message_transport_type); >+ $sth->execute((defined $cat ? $cat : ())); > > while ( my $letter = $sth->fetchrow_hashref ) { > $letters{ $letter->{'code'} } = $letter->{'name'}; >-- >1.7.10.4
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 9016
:
13276
|
20814
|
20815
|
20816
|
20916
|
21164
|
21165
|
21166
|
21167
|
21636
|
21637
|
21638
|
21639
|
22814
|
23272
|
23273
|
23289
|
23290
|
23291
|
23292
|
23293
|
23562
|
23955
|
23956
|
23957
|
23958
|
23959
|
23960
|
24571
|
24572
|
24573
|
24574
|
24575
|
24576
|
25006
|
25123
|
25124
|
25125
|
25126
|
25127
|
25128
|
25129
|
25130
|
25415
|
25416
|
25417
|
25418
|
25419
|
25420
|
25421
|
25422
|
25606
|
25899
|
26182
|
26209
|
26210
|
26211
|
26216
|
26226
|
26233
|
26648
|
26649
|
26650
|
26656
|
26657
|
26658
|
26659
|
26660
|
26661
|
26662
|
26663
|
26664
|
26665
|
26666
|
26667
|
26668
|
26670
|
26672
|
26673
|
27794
|
27795
|
27796
|
27797
|
27798
|
27799
|
27800
|
27801
|
27802
|
27803
|
27804
|
27805
|
27806
|
27807
|
27808
|
27809