Bugzilla – Attachment 35361 Details for
Bug 13240
advanced_notices.pl contains code obfuscation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13240: Remove some code obfuscation
Bug-13240-Remove-some-code-obfuscation.patch (text/plain), 2.37 KB, created by
Marcel de Rooy
on 2015-01-19 08:16:25 UTC
(
hide
)
Description:
Bug 13240: Remove some code obfuscation
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-01-19 08:16:25 UTC
Size:
2.37 KB
patch
obsolete
>From 5999854272b94e73cecdb1bec6d69670b0962394 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 12 Nov 2014 12:23:38 +0100 >Subject: [PATCH] Bug 13240: Remove some code obfuscation >Content-Type: text/plain; charset=utf-8 > >my $bar; >my $foo = $bar->{borrowernumber} ||= {}; >$foo->{one} ||= 'something'; >$foo->{two}++; > >What does $bar contain? > >$VAR1 = { > 'borrowernumber' => { > 'two' => 1, > 'bar' => 'something' > } > }; > >Not really obvious. > >Maybe something I did not see is hidden. > >Test plan: >Verify the digest for DUE and PREDUE work as before. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/advance_notices.pl | 10 ++++------ > 1 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 26f87ae..edcaee7 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -242,9 +242,8 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { > > if ( $borrower_preferences->{'wants_digest'} ) { > # cache this one to process after we've run through all of the items. >- my $digest = $due_digest->{$upcoming->{'borrowernumber'}} ||= {}; >- $digest->{email} ||= $from_address; >- $digest->{count}++; >+ $due_digest->{$upcoming->{borrowernumber}}{email} = $from_address; >+ $due_digest->{$upcoming->{borrowernumber}}{count}++; > } else { > my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); > my $letter_type = 'DUE'; >@@ -278,9 +277,8 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { > > if ( $borrower_preferences->{'wants_digest'} ) { > # cache this one to process after we've run through all of the items. >- my $digest = $upcoming_digest->{$upcoming->{'borrowernumber'}} ||= {}; >- $digest->{email} ||= $from_address; >- $digest->{count}++; >+ $upcoming_digest->{$upcoming->{borrowernumber}}{email} = $from_address; >+ $upcoming_digest->{$upcoming->{borrowernumber}}{count}++; > } else { > my $biblio = C4::Biblio::GetBiblioFromItemNumber( $upcoming->{'itemnumber'} ); > my $letter_type = 'PREDUE'; >-- >1.7.7.6
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 13240
:
33478
|
33479
|
35361
|
35362
|
35704
|
35705
|
35706
|
35707