Bug 13285 Do the right thing if opacthemes is not set

If opacthemes is not defined updatedatabase reports the
subsequent warnings as an error. Take account of the case where
it is not set and default that to bootstrap.

This is probably a rare occurence, but should be handled

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 9958: Improve RoutingSerials sys pref description

The RoutingSerials preference controls if the routing
list related functionality is visible in the serials
module.

To test:
- Go to the system preference editor - RoutingSerials
- Check the current description
- Apply patch
- Check the new description
- Verify functionality matches description

NOTE: The preference change is merely cosmetic. The value is
      still YesNo. A few git reset --hard origin/master
      and page refreshes confirmed expected values.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13458: Display the correct patron categories

Bug 9811 removes useful code.
Actually the AddPatronLists pref is not sent to the template from
members/member.pl.

To fix this issue, we can use the existing not clean way, or compare the
syspref value directly in the template. This second solution is
implemented in this patch.

Test plan:
1/ Set the AddPatronLists pref to 'specific'
2/ On the patron home page (members/members-home/pl), the patron search
result page (members/member.pl after launching a search) and on the
checkouts page/patron search result (circ/circulation.pl after searching
a patron using the check out), verify that the patron category list is
the specific ones.
3/ Test there are no regression with the AddPatronLists pref set to
'general'.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described and fixes the problem.

Note: I am not sure if AddPatronLists makes sense -
if you set it to general patron types, it still preselects the
wrong category type (tried organization, a child patron category
was selected). Also the name is confusiong nowadays with the
Patron list feature.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12895 repair dropbox mode

One day late patrons were restricted even with dropbox mode activated

1) Check in the calendar (Tools/Calendar), that the
   previous days you are about to use as date due are
   really entered as opening day (never know).
2) Add a suspension in the suspension days parameter
   of the circulation rules (Administration/Circulation
   and fine rules) to the MOST specific category of
   borrower and MOST specific type of document among the
   existing rules of the LOGGED IN Site(cf explications
   in the circ-rules page).
3) Choose a borrower using the search by category and an
   item through the advanced search using the limit by type.
4) Checkout the item selecting the previous opening date
   in the Specify-due-date box.
5) Click on Circulation in the upper menu, then on Checkin
   and check the Book drop mode. The Book drop date showed
   should be the previous opening date.
6) Check in the item : you can see that the patron is restricted
7) apply the patch
8) Redo 1 to 5 : Now, you can see that the patron is not restricted.
9) If you redo the test with two day late, you will see that
   the patron is not restricted : that's ok because his
   restriction of one day is already finished.
10) If you redo the test with more than two day late, you see
    that the patron restriction is, as expected, one day shorter
    than it were if the item had been returned without dropbox mode.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13447: Fixed HTML Email Reports

A tiny typo made in runreport.pl when updating it for bug 9530 lead to
no body being attached to html emails.

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 13341 - Hard-coded "Preview" text in OPAC openlibrary.js

The OpenLibrary JavaScript includes an untranslated string, "Preview."
This patch move the string to the template so that it can be translated.

To test, apply the patch and test that the translator picks up the
string:

1. From misc/translator run 'perl translate update [lang]' (e.g. de-DE)
2. Edit misc/translator/po/[lang]-opac-bootstrap.po and add a
   translation for the updated "Preview" string
3. Remove the "#, fuzzy" marker from that entry
4. From misc/translator run 'perl translate install [lang]'
5. Enable the [lang] translation for the OPAC in system preferences
6. Enable the OpenLibraryCovers system preference.
7. In the OPAC switch to the [lang] translation.
7. View the detail page for a title for which there is an OpenLibrary
   cover image. Below it you should see a preview link with the
   translated string you added in step 2.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13252 - SIP2 server should accept IPv6 connections

This small patch adds a check on the SIP2 socket connection if it is
IPv6 and resolves socket address accordingly.

Any newer Debian distro would probably default to IPv6 so it would
eventually affect all SIP servers.

Tests against running SIP server on an IPv6 box:

http://wiki.koha-community.org/wiki/Koha_SIP2_server_setup#Testing_with_Telnet

before patch:
  disconnects immediately. Log output:
  Bad arg length for Socket::unpack_sockaddr_in, length is 28, should be 16

after patch:
  operates normally

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13252 Allow for IPv6 formatted addresses in Port definition

The SIP config has allowed you to specify an interface ip as
part of the listeners/service/port attributei
 e. g.  as port="127.0.0.1:6001/tcp"
with IPv6 the equivalent would normally be
   as port="[::1]:5001/tcp"
However in this case incoming connections will get rejected because
Configuration constructs a string without the brackets
This patch makes tests both formats on incoming connections so that
they are accepted as they were previously

In future the best course is not to include a port identifier in the
port definition then if the server has ipv6 it will bind to all
interfaces and accept both IPv4 and IPv6 traffic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>