Bug 30110: Fix concatenation during assignements
There are several occurrences of `my $var += ` or .= in the code. It should not cause problems but it's confusing. Test plan: Read the patch and confirm that the changes make sense. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
d753755590
commit
6f8b94f49c
|
|
@ -892,7 +892,7 @@ sub CanBookBeIssued {
|
|||
my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
|
||||
$no_issues_charge_guarantors = undef unless looks_like_number( $no_issues_charge_guarantors );
|
||||
if ( defined $no_issues_charge_guarantors ) {
|
||||
my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
|
||||
my $guarantors_non_issues_charges = $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
|
||||
|
||||
if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors && !$inprocess && !$allowfineoverride) {
|
||||
$issuingimpossible{DEBT_GUARANTORS} = $guarantors_non_issues_charges;
|
||||
|
|
|
|||
|
|
@ -889,7 +889,7 @@ sub _build_weighted_query {
|
|||
my $fuzzy_enabled = C4::Context->preference("QueryFuzzy") || 0;
|
||||
$operand =~ s/"/ /g; # Bug 7518: searches with quotation marks don't work
|
||||
|
||||
my $weighted_query .= "(rk=("; # Specifies that we're applying rank
|
||||
my $weighted_query = "(rk=("; # Specifies that we're applying rank
|
||||
|
||||
# Keyword, or, no index specified
|
||||
if ( ( $index eq 'kw' ) || ( !$index ) ) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ sub search {
|
|||
my @args;
|
||||
# private
|
||||
if ( !$public ) {
|
||||
my $join_vs .= q|
|
||||
my $join_vs = q|
|
||||
LEFT JOIN virtualshelfshares sh ON sh.shelfnumber = vs.shelfnumber
|
||||
AND sh.borrowernumber = ?
|
||||
|;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ sub dt_from_string {
|
|||
}
|
||||
|
||||
# Add the facultative time part including time zone offset; ISO8601 allows +02 or +0200 too
|
||||
my $time_re .= qr{
|
||||
my $time_re = qr{
|
||||
(
|
||||
[Tt]?
|
||||
\s*
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ if ( $patron ) {
|
|||
# Check the debt of this patrons guarantors *and* the guarantees of those guarantors
|
||||
my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees");
|
||||
if ( $no_issues_charge_guarantors ) {
|
||||
my $guarantors_non_issues_charges += $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
|
||||
my $guarantors_non_issues_charges = $patron->relationships_debt({ include_guarantors => 1, only_this_guarantor => 0, include_this_patron => 1 });
|
||||
|
||||
if ( $guarantors_non_issues_charges > $no_issues_charge_guarantors ) {
|
||||
$template->param(
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ BEGIN {
|
|||
}
|
||||
my $test_num = 1;
|
||||
foreach (keys(%$ccns)) {
|
||||
my $split_num += scalar(@{$ccns->{$_}});
|
||||
my $split_num = scalar(@{$ccns->{$_}});
|
||||
$test_num += 2 * $split_num;
|
||||
$test_num += 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ BEGIN {
|
|||
}
|
||||
my $test_num = 1;
|
||||
foreach (keys(%$ddcns)) {
|
||||
my $split_num += scalar(@{$ddcns->{$_}});
|
||||
my $split_num = scalar(@{$ddcns->{$_}});
|
||||
$test_num += 2 * $split_num;
|
||||
$test_num += 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ BEGIN {
|
|||
}
|
||||
my $test_num = 1;
|
||||
foreach (keys(%$lccns)) {
|
||||
my $split_num += scalar(@{$lccns->{$_}});
|
||||
my $split_num = scalar(@{$lccns->{$_}});
|
||||
$test_num += 2 * $split_num;
|
||||
$test_num += 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ subtest 'hold_patron_name() tests' => sub {
|
|||
|
||||
is( $sip_item->hold_patron_name, q{}, "SIP item with no hold returns empty string for patron name" );
|
||||
|
||||
my $resp .= C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_name, $server );
|
||||
my $resp = C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_name, $server );
|
||||
is( $resp, q{}, "maybe_add returns empty string for SIP item with no hold returns empty string" );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
|
|
@ -837,7 +837,7 @@ sub test_hold_patron_bcode {
|
|||
|
||||
is( $sip_item->hold_patron_bcode, q{}, "SIP item with no hold returns empty string" );
|
||||
|
||||
my $resp .= C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_bcode, $server );
|
||||
my $resp = C4::SIP::Sip::maybe_add( FID_CALL_NUMBER, $sip_item->hold_patron_bcode, $server );
|
||||
is( $resp, q{}, "maybe_add returns empty string for SIP item with no hold returns empty string" );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue