Bug 7143: Updating history with new developers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c52b086d38cde98504457aa9f40f65ba20bbfbe1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 12075: fix keyboard shortcuts broken by jQueryUI upgrade

The recent jQueryUI upgrade broke keyboard shortcuts in the staff client
because of changes to the jQueryUI API. This patch fixes the problem.

To test, apply the patch and clear your browser cache if necessary.

- View any page in the staff which includes header search tabs for check
  out, check in, or catalog search (staff client home page or
  circulation page for instance).
- Test the keyboard shortcuts: Alt-q for catalog search, Alt-u for check
  out, Alt-r for check in.
- Each keyboard shortcut should select the correct tab.

Followed test plan, patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed that the shortcuts were broken before the patch
and now work again after applying it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dcca71f0befa92d2212855aecfc0f473b6304832)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 5052: make it possible to pick a language if all choices are sublanguage

This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.

This patch changes that condition to have more than one language
selected, grouped or not.

Also send $bidi value always, that was only sent if there is
more than one group language.

To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap

2. Go to Administration > System preferences > I18N
enable those languages on staff/opac

3. Check that language chooser is nowhere to be found

4. Apply the patch

5. Reload staff/opac, now you can see language chooser

NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c212b9328edd69a8e8f5082674a9f29741d159ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11797: add regression test

This patch adds unit tests for C4::AuthoritiesMarc::BuildSummary
for both UNIMARC and MARC21 and a regression test for the "Odd
number of elements in anonymous hash" warning.

To test:

[1] Run prove -v t/db_dependent/AuthoritiesMarc.t.  It should
    report one failure.
[2] Apply the main patch.
[3] Run t/db_dependent/AuthoritiesMarc.t again; it should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2b655dfabc4a4464099e7d9bc219b6714ef7de1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11797: fix odd number of elements in hash warning (MARC21)

This was discovered when someone triggered an authority search
on an authority record that was missing what is assumed the
default subfield for a given field.

It, however, also can be triggered in an OPAC authority search
by looking at the record that lacks the default subfield for a
given field.

TEST PLAN
---------
1) Create an authority record with 180$x and NOT 180$v.
   See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop
   for known tags and default values. The default subfields are
   the first letter of the $subfields_to_report string.
2) Trigger the bug:
   Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=#
             Where # is the authority id of your tweaked record.
             The error occurs in Normal view.
   Method 2: Home -> Cataloging -> + New record
                  -> Click the 'Tag Editor' on 100$a
                  Editing of $a to $b and back may be required.
3) Notice there is an error log entry.
4) Apply the patch
5) Attempt to trigger the bug again
6) That specific error log entry is not generated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Could generate the warning with a missing 151$a with both methods.
No warning anymore after applying this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 129bc3281180d892659d3ad1ef253fbc7ec6f316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11797: fix odd number of elements in hash (UNIMARC)

I got the same warning for my UNIMARC DB.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fa989631f6b6f2d4a6dc86e8b9535bd9ce786c1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11797: (follow-up) fix MARC21 branch of bug more idiomatically

This patch puts the MARC21 variant of the bugfix in alignment
with the UNIMARC variant, removing the use of unnecessary
temporary variables.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc7a99ba7f23c7f77bb28c23613fbd9b4ab61cd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>