Bug 13145 UNIMARC 610 tag isn't displayed in OPAC when there is no $9 subfield

On OPAC detail page, subject fields are not displayed when they are not linked
to authorities ($9 subfield). This is due to a misplelling in UNIMARC XSL
detail page.

TO TEST:

(1) On a Koha UNIMARC, find out a biblio record with a 610 field, without $9
    subfield. Something like:

    610 1 $a Aliment -- Approvisionnement -- Europe -- Histoire

    Or add such a field to an existing record.

(2) Check that OPACXSLTDetailsDisplay is set to 'default'

(3) See this record on OPAC detail page. You must see 'Subject: ' => nothing
    after the 'Subject' label. If your record contains several 610 fields
    without $9, the | character will appear, separating no content.

(4) Apply the patch.

(5) Reload the page seen at step (3): subject is displayed now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested on a UNIMARC installation.
Small XSLT change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194

If you use the restore option with a partial pref file not containing a version, you will have this error. Also the count of updated prefs will be one too high.

This is corrected by a better test of the hash value in the CheckVersionPref subroutine.

Test plan:
[1] Create a small pref file and remove the version pref (if present). You
could for instance do a pref backup and remove most lines.
[2] Use the restore option with and without this patch.
    So, something like:
        maintclone/misc/maintenance/cmp_sysprefs.pl -c r -f 9999crucial.pref
[3] Check on the error message and the pref count.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13028: Followup adding a -partial flag for partial compares

If you compare the database with a partial pref file, you may not be
interested in lots of lines saying that a pref is not in the file. You
were already aware of that ;)
If you add the -partial flag, these lines will be skipped.

Test plan:
Do as described above.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12901: BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

http://bugs.koha-community.org/show_bug.cgi?id=9828

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12901: (consistency followup) add buildBiblioDefaultViewURL to MARC21 XSLT

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

http://bugs.koha-community.org/show_bug.cgi?id=9828

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12901: (QA followup) correct copy and paste error

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described now, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12916 - Missing Test to demonstrate warnings.

Modifying C4/Tags.pm should have tests.

TEST PLAN
---------
1) Apply this test patch only.
2) prove -v t/db_dependent/Tags.t
   -- should see two warnings.
3) Apply the first patch.
4) prove -v t/db_dependent/Tags.t
   -- no warnings.

Signed-off-by: Chris <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm

When the stratify_tags function is called without any tags, the
$min and $max variables are left undefined, which triggers a
warning message about uninitialized values in the subtraction.

TEST PLAN
---------
1) prove -v t/db_dependent/Tags.t
   -- should succeed, but there is no test for empty tags.
2) Make sure that you have no tags
3) In Opac, go to 'Tag cloud'
4) Check the opac error log file
   (e.g. ~/koha-dev/var/log/koha-opac-error_log) for entries
   regarding uninitialized values $max and $min in C4/Tags.pm
5) apply this patch
6) prove -v t/db_dependent/Tags.t
   -- should still succeed, though no tests are added.
7) Reload page 'Tag cloud'
   -- Result: No additional warnings in opac error log file.

Signed-off-by: Chris <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
New and old tests pass. Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>