[koha-commits] main Koha release repository branch master updated. v3.20.00-305-gd49cba2

Git repo owner gitmaster at git.koha-community.org
Mon Jul 20 15:25:16 CEST 2015


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, master has been updated
       via  d49cba287e46b4c1e6656f9ec2c1867bfd633016 (commit)
       via  ff280e01f4927d3860ec3d607e8d3be310dd358b (commit)
       via  1a8962f306d2d2f0c7789c649aa615192ccd5ca1 (commit)
       via  e0986f5a796b24d6fec00d849f7c71caf0dd5640 (commit)
       via  17d04c46190880d3031adbc02553f82234d70fc1 (commit)
       via  8d58acc565c8500d4b9d55cacb3d6d21628a899b (commit)
       via  a72262a950aa701cebe460e2a3a7586edecd86be (commit)
       via  09b34591b665228c3ab38d3d327224c2c59cee6e (commit)
       via  454becb78f21682be0d868b7577f5595c7250ac7 (commit)
       via  ea263a2284f1b81da5718a0cfbc581909c86cf4a (commit)
      from  cd9a827b6928ed0cb80c78ebf897e2d77132296a (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 d49cba287e46b4c1e6656f9ec2c1867bfd633016
Author: Katrin Fischer <Katrin.Fischer.83 at web.de>
Date:   Wed Jun 10 01:43:22 2015 +0200

    Bug 12352: Patron modification request page: Add link to patron record
    
    The patron modification request page in the staff client does show
    the name and home library of a patron, but there is no way to
    go to the patron record. This patch adds a link to the patron details.
    
    Extras: changes display of patron name, so a missing firstname won't
    result in an extra , showing.
    
    To test:
    - Make some update requests from different patron accounts in the OPAC
    - Go to the patron modification request page in staff
    - Verify a link 'Patron details' now shows on each entry and
      works correctly
    
    Followed test plan. Works as expected. QA tools OK.
    Signed-off-by: Marc Véron <veron at veron.ch>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at koha-community.org>
    Not sure the "Patron details" link is at the best place, but I don't
    have something better to suggest.
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit ff280e01f4927d3860ec3d607e8d3be310dd358b
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Mon Jul 13 15:44:23 2015 +0100

    Bug 14524: Don't escape query_cgi with uri
    
    According to the doc, we should not escape query_cgi with the uri
    filter:
    http://www.template-toolkit.org/docs/manual/Filters.html#section_uri
    
    Since query_cgi can contains something like: "idx=kw&q=42", we should
    not escape the & char
    
    Test plan:
    0/ Don't apply the patch
    1/ Go on launch a search at the OPAC
    2/ Click on the RSS icon
    3/ You should arrive on
    opac-search.pl?idx%3Dkw%26q%3D42&count=50&sort_by=acqdate_dsc&format=rss2
    The & has been escaped.
    4/ Apply the patch
    5/ Now you should get result and see an url correctly formatted.
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit 1a8962f306d2d2f0c7789c649aa615192ccd5ca1
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Thu Jul 9 15:35:53 2015 +0200

    Bug 14494: Add some unit tests too for CalcDateDue
    
    The second patch of this report made some changes to CalcDateDue.
    We are adding some unit tests here.
    See the commments on the third patch too.
    
    Test plan:
    Run t/db_dependent/Circulation_dateexpiry.t
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    Amended patch: Set the number of tests for the second subtest (was
    commented) and perltidy the second block.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit e0986f5a796b24d6fec00d849f7c71caf0dd5640
Author: Jonathan Druart <jonathan.druart at koha-community.org>
Date:   Thu Jul 9 09:52:28 2015 +0100

    Bug 14494: Unit tests for CanBookBeIssued related to dateexpiry
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    Moved the test on its own. Nicer than adding TestBuilder in the final part
    of the test. No warnings/errors from TestBuilder, no dependency..
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit 17d04c46190880d3031adbc02553f82234d70fc1
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Mon Jul 6 14:20:07 2015 +0200

    Bug 14494: Terribly slow checkout caused by DateTime->new in far future
    
    An expiry date like 9999-12-31 in the local timezone will make DateTime
    spend a lot of time (maybe 60 seconds) on date calculation. See the
    DateTime documention on CPAN.
    A calculation in floating (or alternatively in UTC) would only take
    a few milliseconds.
    
    This patch makes two changes in this regard:
    
    [1] The compare between expiry date and today in CanBookBeIssued has been
        adjusted in Jonathan's patch. I am moving the compare to the floating
        timezone (as was done in my original patch). This removes a hardcoded
        9999.
    [2] If ReturnBeforeExpiry is enabled, CalcDateDue compares the normal due
        date with the expiry date. The comparison is now done in the floating
        timezone. If the expiry date is before the due date, it is
        returned in the user context's timezone.
    
    NOTE: The calls to set_time_zone moving to or from floating do not adjust
    the local time.
    
    TEST PLAN:
    First without this patch (and the one from Jonathan):
    [1] Set expiry date to 9999-12-31 for a patron.
    [2] Enable ReturnBeforeExpiry.
    [3] Checkout a book to this patron. This will be (very) slow.
    
    Continue now with this patch applied:
    [4] Check in the same book.
    [5] Check it out again. Should be much faster.
    
    Bonus test:
    [6] Set borrower expiry date to today. Change relevant circulation rule
        to loan period of 21 hours. Test checking out with a manual due date
        /time just before today 23:59 and after that. In the second case the
        due date/time should become today 23:59 (note that 23:59 is not
        shown on the checkout form).
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit 8d58acc565c8500d4b9d55cacb3d6d21628a899b
Author: Jonathan Druart <jonathan.druart at koha-community.org>
Date:   Thu Jul 9 09:52:28 2015 +0100

    Bug 14494: Prevent slow checkout if the patron does not have an expiry date
    
    If a patron has a expiry date set to 9999-12-31 (for organizations for
    instance), the checkouts are very slow.
    
    It's caused by 2 different calls to DateTime in CanBookBeIssued:
    1/
      DateTime->new( year => 9999, month => 12, day => 31, time_zone => C4::Context->tz );
    The time_zone should not be set (as it's done in Koha::DateUtils), set to UTC or floating tz.
    
    2/
      DateTime->compare($today, $expiry_dt)
    The comparaison of 2 DT with 1 related to 9999 is very slow, as you can
    imagine.
    
    For 1/ we need to call Koha::DateUtils::dt_from_string (actually, we
    should never call DateTime directly).
    For 2/ we just need to test if the date is != 9999, no need to compare
    it in this case.
    
    Test plan:
    Before this patch, confirm that the checkouts are slow if the patron has a
    dateexpiry set to 9999-12-31.
    update borrowers set dateexpiry="9999-12-31" where borrowernumber=42;
    
    After this patch, you should not see any regression when checking out
    items to an expired patron and to a valid patron.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit a72262a950aa701cebe460e2a3a7586edecd86be
Author: David Cook <dcook at prosentient.com.au>
Date:   Mon Jul 13 14:06:46 2015 +1000

    Bug 14521: SQL injection in local use system preferences
    
    This patch fixes a SQL injection vulnerability in the local use
    system preferences.
    
    _TEST PLAN_
    
    Before applying:
    
    1) Go to Global System Preferences
    2) Click on the "Local use" tab
    3) Add a new preference with the value "') or '1' = '1' -- "
    (be sure to include the space at the end after the comment --).
    4) When the page refreshes, you should now see about 99 other system
    preferences which shouldn't be showing up.
    
    5) Apply the patch
    
    6) Refresh the page
    7) Note that you now only see a system preference for "') or '1' = '1' -- "
    and the other actual local use system preferences.
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit 09b34591b665228c3ab38d3d327224c2c59cee6e
Author: Aleisha <aleishaamohia at hotmail.com>
Date:   Fri Jul 10 10:31:53 2015 -0400

    Bug 14436: Noisy warns in C4/Utils/DataTables/Members.pm
    
    TEST PLAN
    ---------
    1) Backup the koha intranet error log.
    2) Empty the koha intranet error log.
    3) In staff client, go to Patrons
       (/cgi-bin/koha/members/members-home.pl)
    4) Pick any letter to 'Browse by last name'
       -- koha intranet error log now has warns.
       -- the one of importance is the uninitalized value.
    5) Empty the koha intranet error log.
    6) apply this patch
    7) Repeat steps 3 & 4.
       -- koha intranet error log does not contain the
          uninitialized value error.
    8) run koha qa test tools.
    
    Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg at gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit 454becb78f21682be0d868b7577f5595c7250ac7
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date:   Wed Apr 1 13:58:50 2015 +0200

    Bug 9006: Remove AUTOLOAD in C4::Context
    
    Happily this was only used for intranetdir.
    It's time to remove it and replace existing calls.
    
    I used the following commands to catch calls to C4::Context:
    git grep 'C4::Context\->' | grep -v 'C4::Context->preference' | grep -v
    'C4::Context->config' | grep -v  'C4::Context->userenv' | grep -v
    'C4::Context->IsSuperLibrarian' | grep -v 'C4::Context->dbh' | grep -v
    'C4::Context->set_preference' | grep -v '_syspref_cache' | grep -v
    _userenv | grep -v 'C4::Context->interface' | grep -v
    'C4::Context->Zconn' | grep -v 'C4::Context->queryparser' | grep -v
    'C4::Context->tz' | grep -v 'C4::Context->boolean_preference' | grep -v
    'C4::Context->memcached'
    
    NOTE: I applied 14428, and then did what I suggested in comment #2.
          Only intranetdir references appeared.
    
          I applied this patch, and repeated.
          Nothing appeared. This means the autoload references are
          properly removed.
    
          koha qa test tools complained about whitespace, I just fixed
          those. Though, we may wish to perltidy
          auth_fields_substructure.pl on another bug.
    
    Signed-off-by: Mark Tompsett <mtompset at hotmail.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

commit ea263a2284f1b81da5718a0cfbc581909c86cf4a
Author: Jonathan Druart <jonathan.druart at koha-community.org>
Date:   Wed Jun 24 11:24:14 2015 +0200

    Bug 14449: Add authentication check on retrieving item info when receiving
    
    The script catalogue/getitem-ajax.pl is called by acqui/orderreceive.pl
    when item is receipt.
    There is not auth check done, this means anybody can retrieve item info.
    
    Test plan:
    With the acquisition => order_receive permission, try to receive an
    item.
    It should work.
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Very easy to test.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at unc.edu.ar>

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

Summary of changes:
 C4/Circulation.pm                                  |   32 +++---
 C4/Context.pm                                      |   18 ----
 C4/Utils/DataTables/Members.pm                     |    2 +-
 Koha/FrameworkPlugin.pm                            |    2 +-
 admin/auth_subfields_structure.pl                  |    4 +-
 admin/marc_subfields_structure.pl                  |    4 +-
 admin/systempreferences.pl                         |    6 +-
 catalogue/getitem-ajax.pl                          |    9 ++
 .../prog/en/modules/members/members-update.tt      |    3 +-
 .../opac-tmpl/bootstrap/en/modules/opac-results.tt |    6 +-
 reports/manager.pl                                 |    2 +-
 t/db_dependent/Circulation_dateexpiry.t            |  111 ++++++++++++++++++++
 12 files changed, 149 insertions(+), 50 deletions(-)
 create mode 100644 t/db_dependent/Circulation_dateexpiry.t


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list