Bugzilla – Attachment 15494 Details for
Bug 7688
Change subscriptions numbering pattern and frequencies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7688 follow-up: Small fixes for QA #2
Bug-7688-follow-up-Small-fixes-for-QA-2.patch (text/plain), 4.89 KB, created by
Jonathan Druart
on 2013-02-18 09:20:33 UTC
(
hide
)
Description:
Bug 7688 follow-up: Small fixes for QA #2
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-02-18 09:20:33 UTC
Size:
4.89 KB
patch
obsolete
>From 0ed3e612d6b1dd044085b2807a7d46b2a8961308 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 17 Sep 2012 12:04:53 +0200 >Subject: [PATCH] Bug 7688 follow-up: Small fixes for QA #2 > >- "return undef" -> "return" >- ":utf8" -> ":encoding(UTF-8)" >- TAB -> SPACES >--- > C4/Serials.pm | 2 +- > C4/Serials/Frequency.pm | 4 ++-- > C4/Serials/Numberpattern.pm | 4 ++-- > serials/create-numberpattern.pl | 2 +- > serials/subscription-add.pl | 14 +++++++------- > serials/subscription-frequency.pl | 2 +- > serials/subscription-numberpattern.pl | 2 +- > 7 files changed, 15 insertions(+), 15 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 4b0cf2e..5676883 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1034,7 +1034,7 @@ sub GetExpirationDate { > return if ( scalar(@date) != 3 || not check_date(@date) ); > my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity}); > if ( $frequency and $frequency->{unit} ) { >- >+ > # If Not Irregular > if ( my $length = $subscription->{numberlength} ) { > >diff --git a/C4/Serials/Frequency.pm b/C4/Serials/Frequency.pm >index d5c1cbd..51e149f 100644 >--- a/C4/Serials/Frequency.pm >+++ b/C4/Serials/Frequency.pm >@@ -129,7 +129,7 @@ sub AddSubscriptionFrequency { > my $frequency = shift; > > unless(ref($frequency) eq 'HASH' && defined $frequency->{'description'} && $frequency->{'description'} ne '') { >- return undef; >+ return; > } > > my @keys; >@@ -201,7 +201,7 @@ sub ModSubscriptionFrequency { > || !defined $frequency->{'description'} > ) > ) { >- return undef; >+ return; > } > > my @keys; >diff --git a/C4/Serials/Numberpattern.pm b/C4/Serials/Numberpattern.pm >index 4e35803..8747344 100644 >--- a/C4/Serials/Numberpattern.pm >+++ b/C4/Serials/Numberpattern.pm >@@ -143,7 +143,7 @@ sub AddSubscriptionNumberpattern { > && defined $numberpattern->{'numberingmethod'} > && $numberpattern->{'numberingmethod'} ne '' > ) { >- return undef; >+ return; > } > > my @keys; >@@ -206,7 +206,7 @@ sub ModSubscriptionNumberpattern { > || !defined $numberpattern->{'numberingmethod'} > ) > ) { >- return undef; >+ return; > } > > my @keys; >diff --git a/serials/create-numberpattern.pl b/serials/create-numberpattern.pl >index d5e6abf..8aa967e 100755 >--- a/serials/create-numberpattern.pl >+++ b/serials/create-numberpattern.pl >@@ -37,6 +37,6 @@ if($rv == 0) { > ModSubscriptionNumberpattern($numberpattern); > } > >-binmode STDOUT, ":utf8"; >+binmode STDOUT, ":encoding(UTF-8)"; > print $input->header(-type => 'text/plain', -charset => 'UTF-8'); > print "{\"numberpatternid\":\"$numberpatternid\"}"; >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index f744f25..010d91a 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -92,13 +92,13 @@ if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate} eq $firstissuedate ; > $subs->{nextacquidate} = $nextexpected->{planneddate} if($op eq 'modify'); > unless($op eq 'modsubscription') { >- foreach my $length_unit (qw(numberlength weeklength monthlength)){ >- if ($subs->{$length_unit}){ >- $sub_length=$subs->{$length_unit}; >- $sub_on=$length_unit; >- last; >- } >- } >+ foreach my $length_unit (qw(numberlength weeklength monthlength)){ >+ if ($subs->{$length_unit}){ >+ $sub_length=$subs->{$length_unit}; >+ $sub_on=$length_unit; >+ last; >+ } >+ } > > $template->param( %{$subs} ); > $template->param( >diff --git a/serials/subscription-frequency.pl b/serials/subscription-frequency.pl >index 965b0ff..ddfb616 100755 >--- a/serials/subscription-frequency.pl >+++ b/serials/subscription-frequency.pl >@@ -14,6 +14,6 @@ if ($auth_status ne "ok") { > exit 0; > } > my $frequencyrecord=GetSubscriptionFrequency($frqid); >-binmode STDOUT, ":utf8"; >+binmode STDOUT, ":encoding(UTF-8)"; > print $input->header(-type => 'text/plain', -charset => 'UTF-8'); > print "{".join (",",map { "\"$_\":\"".uri_escape($frequencyrecord->{$_})."\"" }sort keys %$frequencyrecord)."}"; >diff --git a/serials/subscription-numberpattern.pl b/serials/subscription-numberpattern.pl >index 5da614e..c54f264 100755 >--- a/serials/subscription-numberpattern.pl >+++ b/serials/subscription-numberpattern.pl >@@ -10,6 +10,6 @@ my $input=new CGI; > my $numpatternid=$input->param("numberpattern_id"); > > my $numberpatternrecord=GetSubscriptionNumberpattern($numpatternid); >-binmode STDOUT, ":utf8"; >+binmode STDOUT, ":encoding(UTF-8)"; > print $input->header(-type => 'text/plain', -charset => 'UTF-8'); > print "{",join (",",map {"\"$_\":\"".(uri_escape($numberpatternrecord->{$_}) // '')."\"" }sort keys %$numberpatternrecord),"}"; >-- >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 7688
:
8110
|
8941
|
8942
|
8943
|
10145
|
10146
|
10468
|
10469
|
10470
|
10739
|
10740
|
10742
|
10743
|
10903
|
10920
|
10985
|
11299
|
11300
|
11489
|
11490
|
12268
|
12269
|
13193
|
13194
|
13195
|
13196
|
14122
|
14123
|
14124
|
14125
|
14996
|
15492
|
15493
|
15494
|
15495
|
15496
|
15534
|
15536
|
15537
|
15538
|
15539
|
15540
|
15541
|
16679
|
16680
|
16681
|
16682
|
16683
|
16684
|
16744
|
17283
|
17284
|
17285
|
17855
|
17856
|
17857
|
18298
|
18299
|
18300
|
18793
|
18794
|
18795
|
19368
|
19369
|
19370
|
19393
|
19395