[koha-commits] main Koha release repository branch 20.05.x updated. v20.05.01-72-g9ec18eedec

Git repo owner gitmaster at git.koha-community.org
Mon Jul 13 19:38:49 CEST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 20.05.x has been updated
       via  9ec18eedec41ad4e2058fe39e03c2df19a966c54 (commit)
       via  79b90fff2f1ff5091c5a050d880c36be34a36f2e (commit)
       via  84711d3d23874dfc8cc41297b4b0d1a0c550846b (commit)
       via  cf93d673a0bcc17e26299f006da1faf00b24fe52 (commit)
       via  b59c5fc63a14013bcb8b43cce093b5d1866db96e (commit)
       via  1ccee84ddcaac20194042cb3d59163628442030f (commit)
      from  1c54f8545611b43672867ac7a34dd8a0c20c20a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9ec18eedec41ad4e2058fe39e03c2df19a966c54
Author: Andrew Nugged <nugged at gmail.com>
Date:   Wed Jun 17 23:18:01 2020 +0300

    Bug 25440: Fixed list of 'show_rule' forming variables in the template
    
    In smart-rules.tt we have `SET show_rule = ...` section which filled
    with 'all used in the loop' variables. Because if historical reasons it
    seems that there are some missing, few old, and even doubled ones.
    This list is fixed now by:
    
      - variable names 'article_requests' and 'renewalsallowed' repeated
        so duplicates are removed;
    
      - 'hardduedatebefore' and 'hardduedateexact' not present in the whole
        site code anywhere anymore;
        IMPORTANT NOTE: these 'hardduedatebefore/hardduedateexact' also
                        exists as remnants in .po-translation files, a lot.
    
      - 'note', 'hardduedatecompare', 'renewalperiod', 'rentaldiscount'
        template variables were missing from this 'show_rule =' checking
        code so they are added.
    
    Order of fields updated to match with above "SET field = ..." pack.
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Bug 25440: (QA follow-up) Correction for typo
    
    'engthunit -> lengthunit
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit d11e16aec74ad694bd56ce3810954091b0bf1259)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit 79b90fff2f1ff5091c5a050d880c36be34a36f2e
Author: Andrew Nugged <nugged at gmail.com>
Date:   Tue May 19 11:20:41 2020 +0300

    Bug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl
    
    This warning emitted:
    
    Use of uninitialized value $maxsuspensiondays in string eq
    at /admin/smart-rules.pl line 257.
    
    But that not just undef-warning, there is broken logic,
    these two lines are mutually contradictory and goes one-by-one:
    
        $maxsuspensiondays = undef if $maxsuspensiondays eq q||;
        $maxsuspensiondays = '' if $maxsuspensiondays eq q||;
    
    Fix is simple: to make it '' if it comes undef.
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit cb09303e11b11de2b25852a707211a054fb2b8e1)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit 84711d3d23874dfc8cc41297b4b0d1a0c550846b
Author: Andrew Nugged <nugged at gmail.com>
Date:   Tue May 19 11:03:13 2020 +0300

    Bug 25440: Fix for "uninitialized value in string eq" in smart-rules.pl
    
    This warning emitted:
    
    Use of uninitialized value in string eq at /admin/smart-rules.pl line 289.
    
    It is solved by one line added to exclude comparison with 'on' string
    when variable is 'undef'.
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 5eebfcf68747b4886b23a9d4c8df37ea7d103edb)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit cf93d673a0bcc17e26299f006da1faf00b24fe52
Author: Andrew Nugged <nugged at gmail.com>
Date:   Sun May 10 18:18:35 2020 +0300

    Bug 25440: Fix for "uninitialized value in hash" warning in smart-rules.pl
    
    This warning emitted:
    
    Use of uninitialized value in hash element
    at /admin/smart-rules.pl line 569.
    
    that happened because we have NULLs in SQL results for 'categorycode'
    and 'itemtype' which later used as 'any' kind of category/item in the
    template, so for the template it passed this way:
    
        $rules->{ $r->{categorycode} }->{ $r->{itemtype} }->...
    
    but undef will stringify as "" to become a hash key ("Hashes are
    unordered collections of scalar values indexed by their associated
    string key" https://perldoc.perl.org/perldata.html),
    
    that's why "undef warning". To prevent warning here is the simple fix:
    
        $rules->{ $r->{categorycode} // '' }->{ $r->{itemtype} // '' }->...
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit b48162f1be1853a89e0ffc898bc0927edef93f95)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit b59c5fc63a14013bcb8b43cce093b5d1866db96e
Author: Andrew Nugged <nugged at gmail.com>
Date:   Sun May 10 13:28:40 2020 +0300

    Bug 25440: Fix for "CGI::param called in list context" in smart-rules.pl
    
    This warning emitted:
    
    CGI::param called in list context from /admin/smart-rules.pl line 262,
    this can lead to vulnerabilities. See the warning in "Fetching the value
    or values of a single named parameter" at CGI.pm line 412.
    
    Explained here: https://metacpan.org/pod/CGI#Fetching-the-value-or-values-of-a-single-named-parameter
    
    And because all these params are not multi-params, so simple "scalar .."
    forcing for CGI->param is the fix. Changes are transparent and same
    values should be assigned as before, just no more warnings.
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit eb8a0ffcc1bb4d751daa4221bd37faa815904db8)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

commit 1ccee84ddcaac20194042cb3d59163628442030f
Author: Andrew Nugged <nugged at gmail.com>
Date:   Sun May 10 13:54:29 2020 +0300

    Bug 25440: Extra duplicated call to CGI->param method removed
    
    In code CGI param 'no_auto_renewal_after_hard_limit' assigned to
    "$no_auto_renewal_after_hard_limit" var, and then just in the next line
    again variable "$no_auto_renewal_after_hard_limit" reassigned with
    call to same "$input->param('no_auto_renewal_after_hard_limit')".
    
    Fixed. No logic or results should be changed.
    
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit b9ba7151667bc6481bc97335b94e44487c9701bd)
    
    Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 admin/smart-rules.pl                               | 28 ++++++++++------------
 .../prog/en/modules/admin/smart-rules.tt           |  2 +-
 2 files changed, 14 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list