]> git.koha-community.org Git - koha.git/commit
Bug 10494: remove spurious warnings from the KohaBranchName plugin
authorGalen Charlton <gmc@esilibrary.com>
Wed, 19 Jun 2013 15:52:56 +0000 (08:52 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 1 Jul 2013 01:45:11 +0000 (18:45 -0700)
commitad2c1b3b8f20b3060c9a3a35c21a0757c685cbec
tree3d061c604c8f69e2b33ad892eb779c09487ba1dd
parent96320a786bac92418b08b5af4d2b68746627482b
Bug 10494: remove spurious warnings from the KohaBranchName plugin

The KohaBranchName plugin now returns an empty string if
given a NULL (undefined) library code or a library code that
is not present in the database (e.g., the '__ANY__' placeholder
that purchase suggestions can use).

To test:

[1] Create a purchase suggestion, setting the library
    to 'Any'.  Create a second one setting the library to
    a specific one.
[2] Go to the suggestions overview page in the staff interface.
    When you do so, the Apache logs should contain a warning
    that looks like this:

[Wed Jun 19 07:13:06 2013] [error] [client 192.168.1.10] [Wed Jun 19 07:13:06 2013] suggestion.pl: Use of uninitialized value in concatenation (.) or string at /home/koha/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt line 487., referer: http://koha-staff.metaquarry/cgi-bin/koha/acqui/acqui-home.pl

[3] Apply the patch.
[4] Refresh the suggestions overview page.  This time, there should be
    no new warning logged.
[5] Verify that the library names for the two pending suggestions
    created in step 1 are displayed correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also adds new tests!

Note: For the test plan to work you have to add the suggestion
from the intranet, as Any is not an available option in OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha/Template/Plugin/KohaBranchName.pm