Bugzilla – Attachment 2598 Details for
Bug 5191
Edit subscription shows patron notification always 'none'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposd patch
0001-Bug-5191-Patron-notification-was-being-reset-to-none.patch (text/plain), 3.03 KB, created by
Colin Campbell
on 2010-09-01 15:58:17 UTC
(
hide
)
Description:
Proposd patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2010-09-01 15:58:17 UTC
Size:
3.03 KB
patch
obsolete
>From caeac6760036fb9045d97876a54ef471bdbde0bd Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 1 Sep 2010 16:47:23 +0100 >Subject: [PATCH] Bug 5191 Patron notification was being reset to none >Content-Type: text/plain; charset="utf-8" > >The value of the letter variable was not being correctly passed >to the edit template instead it was reset to none >Also compressed some verbage from letter_loop generation >(if you want a scalar use one) >removed an unused $count variable (?!) >and put a couple of lone )s back on the line they came from >--- > serials/subscription-add.pl | 26 +++++++++++++------------- > 1 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index d8c0ea3..143cf88 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -85,7 +85,9 @@ if ($op eq 'mod' || $op eq 'dup' || $op eq 'modsubscription') { > $subs->{$_} = format_date($subs->{$_}); > } > } >- $subs->{'letter'}='' unless($subs->{'letter'}); >+ if (!defined $subs->{letter}) { >+ $subs->{letter}= q{}; >+ } > letter_loop($subs->{'letter'}, $template); > $nextexpected = GetNextExpected($subscriptionid); > $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ; >@@ -131,10 +133,11 @@ for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{b > $template->param(branchloop => $branchloop, > DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), > ); >-my $count = 0; > # prepare template variables common to all $op conditions: >-$template->param( 'dateformat_' . C4::Context->preference('dateformat') => 1 , >- ); >+$template->param( 'dateformat_' . C4::Context->preference('dateformat') => 1 ); >+if ($op!~/^mod/) { >+ letter_loop(q{}, $template); >+} > > if ($op eq 'addsubscription') { > redirect_add_subscription(); >@@ -151,10 +154,8 @@ if ($op eq 'addsubscription') { > } > push( @sub_type_data, \%row ); > } >- $template->param(subtype => \@sub_type_data, >- ); >+ $template->param(subtype => \@sub_type_data); > >- letter_loop('', $template); > > my $new_biblionumber = $query->param('biblionumber_for_new_subscription'); > if (defined $new_biblionumber) { >@@ -170,16 +171,15 @@ if ($op eq 'addsubscription') { > sub letter_loop { > my ($selected_letter, $templte) = @_; > my $letters = GetLetters('serial'); >- my @letterloop; >- foreach my $thisletter (keys %$letters) { >- my $selected = $thisletter eq $selected_letter ? 1 : 0; >- push @letterloop, { >+ my $letterloop; >+ foreach my $thisletter (keys %{$letters}) { >+ push @{$letterloop}, { > value => $thisletter, >- selected => $selected, >+ selected => $thisletter eq $selected_letter, > lettername => $letters->{$thisletter}, > }; > } >- $templte->param(letterloop => \@letterloop) if @letterloop; >+ $templte->param(letterloop => $letterloop); > return; > } > >-- >1.7.2.2 >
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 5191
:
2593
| 2598