Commit Graph

25547 Commits

Author SHA1 Message Date
Marc Véron 17ed90f215 Bug 16589 - Quote of the day: Fix upload with csv files associated to LibreOffice Calc
To reproduce:
- Install LibreOffice and make sure that csv files are associated to Calc
  (Note: tested with Firefox 46.0.1 on Windows 8)
- Go to Home > Tools > Quote editor > Quote uploader
- Try to upload a valid CSV (e.g. Example from Bug 15684)
Result: File can not be uploaded
        (Incorrect filetype: application/vnd.sun.xml.calc)
To test:
- Apply patch
- Try to upload again
Expected result: Quotes are imported.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Can't reproduce on a Mac but get it fails on a Windows Box: fixed with this
  patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Can't recreate on debian but the fix looks safe.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8631ebaf9f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 34f8ab6f40)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:20:49 +02:00
Owen Leonard a97e139921 Bug 15676 - Actions in pending offline circulation actions are not translatable
This patch modifies the offline circulation transaction processing page
so that English strings describing actions are processed in the template
rather than being output directly from the script.

To test, apply the patch and create an offline circulation file
containing at least one checkout, one check-in, and one payment.

- Upload the file and choose 'Add to offline circulation queue.'
- View pending offline circulation actions
- In the list of pending actions, the actions column should show "Check
  out" instead of "issue," "Check in" instead of "return," and "Payment"
  instead of "payment."

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e9d6ac9478)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit acc459fa1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:17:41 +02:00
Dimitris Antonakis f6d2b24938 Bug 14897 - Header name mismatch in ./modules/catalogue/detail.tt
We changed the detail.tt file for staff interface from Publication details to
"Serial enumeration / chronology" to match the cataloguing editor.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 43d77fdcf0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4b3b7bbd8d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:16:32 +02:00
Blou 9c7fbadac0 Bug 14605 - Corrects the individual fine's description
When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description.

STEPS:
1) in the staff, go to a user with a fine to pay.
   a) if none, go to a user and Fines>>"Create manual invoice" with a
      distinctive description.
2) In Fines>>Pay fines, click the "Pay" button on the line of the fine.
3) This will take you a "Pay an individual fine" screen, where the description
   will look like "Staff Mrs", for the category and title of the borrower.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 63041c19c9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 744b035932)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:15:12 +02:00
Jonathan Druart 51417fde52 Bug 16492: Add a FIXME to explain the possible problem with no_set_userenv
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4f3067184d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ac00e73077)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:12:37 +02:00
Jonathan Druart f952cf0b7f Bug 16492: Test that no_set_userenv will not set userenv if not exist yet
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bb6e70fe7d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f69eeca6c4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:12:36 +02:00
Kyle M Hall 853d297415 Bug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron home branch as the logged in library
Bug 14507 introduced the use of checkpw in C4::SIP::ILS::Patron so that
non-Koha internal authentication processes would be able to function via
SIP ( LDAP et al ).

The problem is that checkpw changes the userenv to that of the patron!
This is not usually an issue in Koha because most of the time that
patron running through checkpw is the one to be logged in.

Aside from SIP2 the only other area where this may be an issue is in SCO
when using SelfCheckoutByLogin.

Test Plan:
1) On master, check out an item to a patron via SIP2
2) Note the checkout lists the item as having been checked out
   from the patron's home library not matter which library is was
   supposed to be checked out from.
3) Apply this patch
4) Re-checkout the item
5) The item should now be checked out as if it was checked out from
   the library as defined in the SIP configuration file.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 90307bcbfa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 57086a241e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:12:34 +02:00
Jonathan Druart 32bf30da9d Bug 16695: Require Exception::Class 1.38 instead of 1.39
Looking at
http://cpansearch.perl.org/src/DROLSKY/Exception-Class-1.40/Changes
there is no need to require 1.39

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a4c44b9f64)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 700fbd0a35)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 11:08:36 +02:00
Jonathan Druart 6f26745c21 Bug 16668: Fix t/Ris.t tests
Caused by bug 16442.
Now we need to mock the marcflavour pref

Test plan:
  prove t/Ris.t
should return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 023384811f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a1f1ea0317)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:58:50 +02:00
Jonathan Druart 0bd65b6e11 Bug 16199: Remove C4::Ris::charconv
This subroutine always returns what has been sent in parameter.
It is unecessary and can be removed.

Test plan:
  prove t/Ris.t
should not be noisy

Export a catalogue record in Ris should generate the same file with and
without this patch

NOTE: With/Without were identical in my testing.
      t/Ris.t is nicely silenced.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 88dc70f7e6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:53:35 +02:00
Jonathan Druart eb8c112456 Bug 16578: Same fix for the staff interface
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as first patch
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3948102f2a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 43002c3b0e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:44:36 +02:00
Tomas Cohen Arazi 27e63b7867 Bug 16578: Fix wide character errors in opac-export.pl
This simple patch fixes wide character warning raised by opac-export.pl when
'MARC (Unicode/UTF-8)' and 'MARC (Unicode/UTF-8, Standard)' formats are chosen
for downloading records.

To test:
- Have records indexed
- Open your OPAC logs:
  $ tail -f /var/log/koha/kohadev/opac-error.log
- Open the detail page in the opac for a record
- Choose Save record > MARC (Unicode/UTF-8)
=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh...
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> FAILE opac-export.pl: Wide character in print...
- Apply the patch
- Choose Save record > MARC (Unicode/UTF-8)
=> SUCCESS: No warnings raised.
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> SUCCESS: No warnings raised.
- Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7d4844e171)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 164ffdb43c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:44:32 +02:00
Jonathan Druart 0be92bcc01 Bug 16465: Fix typo issues vs checkouts
Test plan:
Confirm the wording is correct

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af59b66941)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c5fc0fcd0e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:43:13 +02:00
Jonathan Druart d79a51ae9f Bug 16465: discharge - Add a title tag at the OPAC
Test plan:
Confirm that the opac-discharge.pl has now a title

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 27254de06d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5ce7baf937)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:43:12 +02:00
Marcel de Rooy ea04333e53 Bug 16428: [QA Follow-up] Useless call to GetMarcStructure in _build_default_values_for_mod_marc
The routine calls GetMarcStructure and does not use its return value
after all.

Test plan:
Run t/db_dependent/Items.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6a706b86a2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b31ee2eaf9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:41:25 +02:00
Jonathan Druart 9c03081053 Bug 16428: Use the biblio framework to know if a field is mapped
The subroutine _build_default_values_for_mod_marc takes the
frameworkcode in parameter, but ModItemFromMarc did not pass it.
It uses it to know if a field is mapped or not to a Koha field
(C4::Koha::IsKohaFieldLinked).
Consequently the default framework ("") was always used.

This bug has been found working on bug 13074 and has been put on a
separate bug report to ease the backport.

Test plan:
Without this change, the tests added by bug 16428 won't pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 52b1b8eae1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4ebfb709f6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:41:21 +02:00
Jonathan Druart 679d0414a0 Bug 16441: Fix Letters.t
These tests were wrong, but the package variable used to cache the
letters hid the problem.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 687a7e22b6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a44040d07d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:38:43 +02:00
Jonathan Druart 799ac3cb86 Bug 16441: Do not use a package variable to cache C4::Letters::getletter
C4::Letters::getletter use a package variable (%letter) to cache letter
returned by the subroutine.
I have not found any direct issues caused by that but it is safer to
remove it.
It won't be a big deal to hit the DBMS to get a valid letter when
needed.

No test plan here, just confirm that the changes make sense.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that performance loss is just a millisecond or so per
subsequent call of getletter.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4f388f649)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c63dccba27)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:38:42 +02:00
Marcel de Rooy bf40e2b333 Bug 16443: [QA Follow-up] Add two tests for get_fields
Adds t/db_dependent/Members/Statistics.t.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30cf9ee277)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 03d51281b0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:31:38 +02:00
Jonathan Druart bd17c1f874 Bug 16443: Make C4::Members::Statistics plack safe
If the prefs is updated, the fields won't be.
To make sure we already fetch updated values, we should remove the
package variable and define it in the subroutine.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 29e402d398)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 93ffd58fe3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:31:37 +02:00
Jonathan Druart 2074138283 Bug 16455: Remove the "Too late to run INIT block" from C4::Tags
The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an
other dictionary, different from the default one (/usr/bin/ispell).

To do so we need to set $Lingua::Ispell::path to the expected path.
It's currently done in the INIT block.

If you try to use C4::Tags, you will get the famous "Too late to run
INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to
load functions at run time, when we are using C4::Tags when hitting a pl
script, the compilation phase is finished and it's "too late to run INIT
block" from C4::Tags.

I do not really know if it has an impact on the behavior of
Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT
block is not executed when we want.

Test plan:
under Plack,
- hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no
longer appears
- Use another dictionnary (??), fill TagsExternalDictionary with its
  path and confirm that it is used by the tags approval system

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7d916c380a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6ff159e214)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:30:47 +02:00
Jonathan Druart 13bb412c73 Bug 16508: Updating a syspref requires parameters_remaining_permissions
And not all of parameters flags.

Test plan:
1/ Create a staff user.
2/ Go to details, select more->set permissions.
3/ Set catalogue, Manage Koha system settings (Administration panel),
manage circulation rules, and Remaining system parameters permissions.
4/ Log in as the new staff user, go to administration > system
preferences. Change a syspref and save it... it will save correctly.
5/ Log back in as superlibrarian
6/ On the 'set permissions' screen, un-check 'manage circulation rules'
and save.
7/ Log back in to the new staff user, and try to change the same
systemprefrence and save.

Followed test plan, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f2fe433cf9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 259fe9947b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:28:16 +02:00
Jonathan Druart 37a0ba4f10 Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
The script opac/opac-addbybiblionumber.pl is not plack safe because the
variable @biblios is declared with our and is not assigned to an empty
array (so not reset).

The issue:
When trying to add items to a list (virtualshelf), the biblionumbers are
added to the @biblios variable and the list is not reset between each
run.

Test plan:
Check from records from the result list and add them
to a list.
Cancel or save and re-add them (or others) to a list (same or
different).
=> Without this patch, the list of records will never stop growing, the
previous items added are still listed when adding new ones.
=> With this patch, the behavior is the one expected.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ab1beed06f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2729f038c3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:27:30 +02:00
Aliki Pavlidou 825d496194 Bug 15641 - Typo in explanation for MembershipExpiryDaysNotice
There's an extra period after the word "in" in the MembershipExpiryDaysNotice
sys "Send an account expiration notice when a patron's card will expire in.
[value box

Bug fixed!

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6b7f4a3a9e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e242625721)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:26:14 +02:00
Rocio Dressler 20cbdd2311 Bug 16537 - Overdue and Status triggers grammar
Test plan:

1) Go to the staff client
2) Click on Tools - Overdue notice/status triggers
3) Confirm that the first sentence reads "a" checkout rather than "an" checkout

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a589879f49)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 020d755ed0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:25:09 +02:00
Jonathan Druart 73df494cca Bug 16444: Make C4::Tags plack safe
C4::Tags use a package variable to cache the pref
TagsExternalDictionary, it's not needed and not safe.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fff754a7fc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 97a3f03970)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:23:52 +02:00
Jonathan Druart 2bb2e2520c Bug 16458: Update library when a guarantor is set
If you edit a patron from the Edit link of the patron information block
(step 1 of the memberentry script), the branchcode is not displayed. If
you set a guarantor to a child from this form, a JavaScript error will
be raised:
  JavaScript error form.branchcode is undefined

It happens because there is the branchcode is not displayed and there is
no element with a branchcode name.

To avoid this issue, a branchcode hidden input is added to the form and
it will be updated when a guarantor is selected (same behavior as when
you edit a patron using the complete form).

Test plan:
Edit a patron using the Edit link of the patron info block (not the Edit
button in the toolbar)
Set a guarantor
=> Notice that the branchcode of the patron has been updated with the
branchcode of the guarantor

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fc35a5099f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b7a0322258)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:21:16 +02:00
Jonathan Druart b5934c48ad Bug 16442: Make C4::Ris plack safe
C4::Ris incorrectly uses 4 package variables:
- $utf: not used, can be removed
- $intype: set to marcflavour once, but later it assumes that it is
  usmarc if not defined
- $marcprint: always 0, so set it to 0
- $protoyear: only used in 1 subroutine, let's define it at this
  level

Test plan:
Just make sure the RIS export works as before this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 87b181c6d4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a987ff3ba9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:05:36 +02:00
Claire Gravely 5976b4f16f Bug 16642 - Fix capitalisation for upload patron image
To fix capitalisation on the staff interface when patronimages is turned on.

Test plan:
1. In staff interface. Turn on patronimages sys preference.
2. Go to a patron without an image and check that the "Upload
 patron image" box heading now has correct capitalisation.
3. Go to a patron with an image already uploaded and check the
 "Manage patron image" box heading has correct capitalisation.

Signed-off-by: Sofia <szapoun@lib.auth.gr>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 78b2fde348)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9a2c6bfde2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:04:17 +02:00
Jonathan Druart 8f8ba80f2e Bug 16565: Drop additional_fields and additional_field_values before creating them
These 2 tables should be dropped before trying to create them

Test plan:
From the SQL CLI, source the kohastructure.sql file
source it again
=> Without this patch you get 2 warnings
ERROR 1050 (42S01) at line 3580 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_fields' already exi
sts
ERROR 1050 (42S01) at line 3596 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_field_values' alrea
dy exists

=> With this patch, you won't get them

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a01cd77e19)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b49adab4a1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 10:03:45 +02:00
Mark Tompsett 2131a6dec2 Bug 16582 t/Price.t test should pass if Test::DBIx::Class is not available
TEST PLAN
---------
1) prove t/Prices.t
   -- failure
2) apply patch
3) prove t/Prices.t
   -- nicely skipped when Test::DBIx::Class is not available.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5ba5f9e0c5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6523236123)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:59:20 +02:00
Kyle M Hall 3cd0ac25fa Bug 16610 - Regression in SIP2 user password handling
Previous to bug 14507, SIP2 only did internal authentication. A change
to the way we check empty passwords has caused any empty password to
send back a CQ of Y. Previous to that patch set, a CQ of Y would only be
sent back of the patron password column was NULL. Now, an empty AD field
*always* returns a CQ of Y.

Test Plan:
1) Send a patron information request with an empty AD field
   Note: You must send the AD field or you won't get back a CQ field
2) Note you get back a CQ of Y
3) Apply this patch
4) Repeat step 1
5) Note you now get back a CQ of N

Signed-off-by: Trent Roby <troby@bclib.info>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 71f0370ddd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 66c9ef12c1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:55:13 +02:00
Marcel de Rooy 8d9a4841e4 Bug 16504: [QA Follow-up] Make koha-qa happy with two newlines
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 567a1a9021)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5712275a46)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:52:17 +02:00
Jonathan Druart ea598df624 Bug 16504: (follow-up for bug 15163) Do not remove attributes of other patrons
Simple patch for a silly error, this single line is going to fix a
critical bug.
If a patron attribute is limited to a library, all the values for that attributes
for every patrons will be deleted.

Test plan:
Create a patron attribute limited to a library
Set the the attribute for a patron
Set the the attribute for another patron
=> Without this patch applied, the attribute's value for the first
patron is deleted
=> With this patch applied, the 2 values exist in the DB after the
second edition

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit da94410ab5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 247bd55876)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:52:12 +02:00
Jonathan Druart fc2776a5c9 Bug 16504: Add regression tests
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 72bd06e3a8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5949faae07)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:52:08 +02:00
Aleisha 26cd82e15c Bug 16511: Making contracts actions buttons
To test:
1) Go to Acqui -> find a vendor
2) On Vendor details page (supplier.pl) confirm that Contracts table now
   has one column called Actions
3) Confirm that Edit and Delete show as buttons
4) Confirm that buttons don't wrap on a narrower browser
5) Click Contracts tab
6) Confirm Actions column, Edit and Delete buttons, and button's don't
   wrap

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 23c8dc0e63)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 92c08a6a4e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:44:55 +02:00
Aleisha be21661a31 Bug 16525: Have cancel button when adding new aq budget
At the moment you only see the cancel button on the form if editing an
existing budget. This patch adds a cancel button to the form which adds
a budget. Also changes the wording of the save button from 'Save
changes' to just 'Save' so it makes more sense when adding a new budget

To test:
1) Go to Admin -> Budgets -> New budget
2) Notice 'Save changes' button and no cancel
3) Apply patch and refresh page
4) Notice 'Save' button and 'cancel' link
5) Click 'cancel' - should be taken to Budgets administration page
6) Edit an existing budget
7) Click 'cancel' - should be taken to the funds page for that budget

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Sabine Liebmann <Liebmann@dipf.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Still an issue: If edit a budget fron aqbudgets.pl, then cancel, you get
aqbudgets.pl?budget_period_id=XX. But existed before this patch.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c4f17a6eb3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0c4661110c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:41:22 +02:00
Owen Leonard e876a7112b Bug 16001 - Use standard message dialog when there are no cities to list
If there are no existing cities in Administration -> Cities and Towns,
the message saying so should be in the standard message dialog.

Another minor change: Edit the message to say "There are no cities
defined," which I think reads better in English.

To test you must have no cities and towns defined.

Apply this patch and go to Administration -> Cities and Towns. You
should see a message displayed in a standard "message" style dialog.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Better view, no errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 89b41ede65)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 300cfc1ac8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:38:36 +02:00
Brendan Gallagher d4bf05b054 Bug 16200: Update DB rev (3.22.07.001) 2016-06-16 09:25:14 +02:00
Lari Taskula 36303e71f6 Bug 16200: Convert all existing expired holds accounttype to HE
Before Bug 16200 expired holds have used accounttype F which is also used by
other type of fines. This patch updates all existing expired holds to new
accounttype HE (Hold Expired).

To test:
-1. Make sure you translated the string in previous patch of this buug
1. Find a Patron with "Hold waiting too long" fines and go to his Fines tab
2. Change Koha's language to some other than English
3. Observe that "Hold waiting too long" is still in English
4. Apply patch and run database update
5. Go back to Patron's Fines tab
6. Observe that "Hold waiting too long" is now translated

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 09de19c427)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d803683702)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:22:29 +02:00
Lari Taskula 1751495901 Bug 16200: Make 'Hold waiting too long' translatable and give it an unique accounttype
Holds that have expired have been untranslatable in Patron's Fines-tab. Also, they are
mixed with other type of fines with accounttype "F". This patch gives expired holds an
own accounttype "HE" (Hold Expired) and modifies the boraccount to recognize this new
accounttype in order to make it translatable.

To test:
1. Make a hold and let it expire
2. Go to Patron's Fines tab
3. Change Koha's language to some other than English
4. Observe that there is a "Hold waiting too long" fine described in English
5. Apply patch
6. Make another hold and let it expire
7. Update translations
8. Find "Hold waiting too long" from your .po file
9. Translate it and install translations
10. Go back to Fines tab and observe that the new expired hold is translated

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7163fcfeea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 326616d2bc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:22:26 +02:00
Robin Sheat 8474209c40 Bug 16617 - fix issues with debian/control
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e604538283)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8b9812fa83)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:17:58 +02:00
Owen Leonard 12904eb27f Bug 16548 - All libraries selected on Tools -> Export Data screen
This patch adds "select all" and "select none" links to the display of
libraries in the export bibliographic records form.

Also modified: call number range and accession date fields have been
grouped in their own fieldsets in the hopes that this is more readable.
Page title and breadcrumbs have been corrected to read "Export data"
instead of "MARC export," matching menu items.

To test, apply the patch and go to Tools -> Export data.

- Test the select all/select none links and confirm that they work as
  expected.
- Confirm that the structural changes to the form look okay.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Post sign-off revision: Use the standard "Clear all" instead of "Select
none."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 06b9194cdd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a85be57e1c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:06:23 +02:00
Kyle M Hall 954e4107c5 Bug 16569 - Message box for "too many checked out" is empty if AllowTooManyOverride is not enabled
If the limit for number of items checked out is reached, the message box
shows up but is empty.

Test Plan:
1) Disable AllowTooManyOverride
2) Check out items to a patron until the patron has reached the limit
   of checkouts he or she can have
3) Try to check out one more item
4) Note the empty message box
5) Apply this patch
6) Try to check out one more item again
7) Note the message is now visible

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit af43f91335)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a47180eb3b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:03:56 +02:00
Jonathan Druart 3454c9a658 Bug 16597: Fix XSS in shelves.pl
Reported by
Alex Middleton at Dionach

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fa1dd408ca)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:02:30 +02:00
Chris Cormack 8d6486013b Bug 16597: Fix XSS in opac-shareshelf
To test
1/ Go to /cgi-bin/koha/opac-shareshelf.pl?op="><script>alert('XSS')</script>&shelfnumber=5
2/ Notice you see a js alert
3/ Apply patch
4/ It is gone

Reported by
Alex Middleton at Dionach

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c47c835672)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:02:29 +02:00
Chris Cormack 5d1f6b08cc Bug 16597: Fix XSS in opac-shelves.pl
To test
1/ Hit /cgi-bin/koha/opac-shelves.pl?shelfnumber=5&category=1&op=edit_form&referer="><script>alert('XSS')</SCRIPT>
2/ Notice JS is executed
3/ Apply patch
4/ Notice it's fixed

This bug reported by

Alex Middleton at Dionach

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 344033c324)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:02:27 +02:00
Jonathan Druart dd94d1bc4c Bug 16599: Fix other potentials XSS for shelfname
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit bb4543f7db)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:02:13 +02:00
Jonathan Druart 858e3b2043 Bug 16599: Fix XSS in opac-shareshelf.pl
Test plan:
- Create a list with the name "<script>alert(1)</script>"
- On the shelf list, click on share
=> Without this patch you will see the JS alert
=> With this patch applied you won't see it

Reported by Kaybee at Dionach

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a44a930c07)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-16 09:02:09 +02:00
Hector Castro 3b1a7ba719 Bug 16343: 7XX XSLT subfields displaying out of order
This patch respect previous css classes
.authordates and .relatorcode but also include .titleportion

.authordates {display: none;}
.titleportion {display: none;}
.relatorcode {display: none;}

To test:
- Stage the two record attached with titles:
  - Surface & coatings technology.
  - Women crime writers.
- Reindex zebra (necessary to Opac and Itranet results)
- Leave empty the OPACUserCSS and IntranetUserCSS sysprefs
- Go to the new records in OPAC and Intranet detail page
- See the wrong display of dates
- Apply patch and refresh the page
- Test in OPACUserCSS and IntranetUserCSS the css stated before
- Play deleting or adding the classes
- Test with multiple records with 700 (with and without dates, etc;
  710 and 711)

NOTE: dates in 710 and 711 can be hidden with .titleportion class;
dates in this kind of heading go with another data for example:
Catholic Church. Plenary Council of Baltimore (2nd : 1866)
Patch rebased some typos fixed in comments

Signed-off-by: Dani Elder <danielle@bywatersolutions.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0073a0c3f8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-06-09 10:04:10 +02:00