]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 14598: (followup) Remove unused and non-existent C4::ItemType include
Tomas Cohen Arazi [Fri, 1 Apr 2016 15:25:39 +0000 (12:25 -0300)]
Bug 14598: (followup) Remove unused and non-existent C4::ItemType include

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e31eb08e29f637f90d095df31388bf64f2b685a9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598 [QA Followup] - Update localuse statistics also
Kyle M Hall [Tue, 19 Jan 2016 14:34:20 +0000 (14:34 +0000)]
Bug 14598 [QA Followup] - Update localuse statistics also

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c042307db35f59fe2dca8d8fa214be7b39b0277e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598 [QA Followup] - Make unit test pass
Kyle M Hall [Tue, 12 Jan 2016 16:04:55 +0000 (16:04 +0000)]
Bug 14598 [QA Followup] - Make unit test pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ad800ce36e07915628602c4f6ba2ccf83bacdd16)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598 [QA Followup] - Correct the behavior of GetItem
Kyle M Hall [Fri, 18 Dec 2015 14:59:02 +0000 (14:59 +0000)]
Bug 14598 [QA Followup] - Correct the behavior of GetItem

Currently GetItem sets itemtype to the biblio itemtype if no item level
itemtype exists. Instead, it should only do this if item_level-itypes
is not set.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 73b85e98755e075044db72b973cb3ebd6c0f4891)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598 [QA Followup] - Only fetch bib data if needed
Kyle M Hall [Fri, 20 Nov 2015 14:23:22 +0000 (14:23 +0000)]
Bug 14598 [QA Followup] - Only fetch bib data if needed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4384e081968c7dd9c95c34d78bda2eba199a3243)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598 - QA Followup touching CanBookBeIssued subroutine
Brendan A Gallagher [Thu, 19 Nov 2015 21:13:05 +0000 (21:13 +0000)]
Bug 14598 - QA Followup touching CanBookBeIssued subroutine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 096b6c3938d060ab973e76f6840bd26ec8ef26cd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598: (DB update) fix NULL itemtypes in statistics on 'return' rows
Tomas Cohen Arazi [Tue, 1 Sep 2015 14:52:17 +0000 (11:52 -0300)]
Bug 14598: (DB update) fix NULL itemtypes in statistics on 'return' rows

This patch introduces an updatedatabase.pl entry that takes care of
updating existing statistics rows.

It does so by looping on the statistics rows, collecting itemnumber occurences
that are have NULL itemtypes.
It then chooses the right itemtype following what is proposed on bug 14651, and
then updates the rows in statistics using the calculated itemtype.

Regards

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2cdec7ff9178fd8f70b5885b7c2936ddf09e69f7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598: (QA followup) Don't die on bad barcode
Kyle M Hall [Mon, 27 Jul 2015 15:16:56 +0000 (11:16 -0400)]
Bug 14598: (QA followup) Don't die on bad barcode

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 34eb4c1fa95ea14047413436b8df42299d029ca4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598: Make C4::Circulation::AddReturn store the right itemtype
Tomas Cohen Arazi [Mon, 27 Jul 2015 14:40:38 +0000 (11:40 -0300)]
Bug 14598: Make C4::Circulation::AddReturn store the right itemtype

This patch makes C4::Circulation::AddReturn correctly store the itemtype
on the 'statistics' table.

To reproduce:
- Checkout master.
- Make a checkout.
- Check the 'statistics' table and notice the itemtype is correctly set
  > SELECT * FROM statistics;
- Check the item in.
- Check the 'statistics' table and notice the itemtype is not set
  > SELECT * FROM statistics WHERE type="return";
=> FAIL: itemtype is set to NULL

To test:
- Apply the regression tests patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail
- Apply this patch
- Run the regression tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> SUCCESS: Tests now pass.
- Repeat the 'To reproduce' steps
=> SUCCESS: itemtype is now correctly set (in real life)
- Happily sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 285ac7a31eb50262af9c6a51502630ba150b14fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table
Tomas Cohen Arazi [Sun, 26 Jul 2015 05:05:16 +0000 (02:05 -0300)]
Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table

This patch adds tests for C4::Circulation::AddReturn(). Both tests are wrapped
inside a subtest, and look for AddReturn storing the right itemtype on the
'statistics' table.

Note: It also refactors the file a bit, to avoid side effects. And uses TestBuilder
to make it independent on already-present db data. It also removes warnings by mocking
C4::Context::userenv

To test:
- Apply the patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail bacause AddReturn is not storing the itemtype
- Sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 357a69b0e174c813ef52d1ee7f47cd810c76938d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15690: Hardcoded 16 is uncool
Mark Tompsett [Wed, 14 Sep 2016 19:14:02 +0000 (15:14 -0400)]
Bug 15690: Hardcoded 16 is uncool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Followed test plan in comment #7, works as expectd.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a618c62ae6c6ddc8334e795ddb1760a7363a88f8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15690: CardnumberLength should not be bigger than 16
Jonathan Druart [Tue, 13 Sep 2016 14:43:50 +0000 (15:43 +0100)]
Bug 15690: CardnumberLength should not be bigger than 16

borrowers.cardnumber is a varchar(16), so CardnumberLength should not
have a max > 16

Test plan:
Test different value in CardnumberLength ("20", "20,30", "40,")
Edit a patron a make sure the text display under the cardnumber input is
correct

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 87380d8b460857157b4cf06fa8def626d1d2badb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17420 - record export fails when itemtype on biblio - followup
Fridolin Somers [Mon, 7 Nov 2016 15:07:01 +0000 (16:07 +0100)]
Bug 17420 - record export fails when itemtype on biblio - followup

Same as previous patch for misc/export_records.pl.

Test plan :
- Use syspref item-level_itypes = biblio record
- Run misc/export_records.pl
=> Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ...
=> With patch you get a correct export file

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17420 - record export fails when itemtype on biblio
Fridolin Somers [Mon, 10 Oct 2016 14:46:04 +0000 (16:46 +0200)]
Bug 17420 - record export fails when itemtype on biblio

In Tools, Export data, you can export with a filter on item type.
When item type is on biblio record, you get the error :
export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150

Looks like its because this code use to be a SQL Select and is now a DBIx call :
                          C4::Context->preference('item-level_itypes')
                            ? ( 'items.itype' => $itemtype )
                            : ( 'me.itemtype' => $itemtype )

This patch corrects by using "me.itemtype"

Test plan :
- Use syspref item-level_itypes = biblio record
- Go to Tools > Export data : /cgi-bin/koha/tools/export.pl
- Select an item type
- Click on "Export biblio records"
=> Without patch you get an error 500
=> With patch you get a correct export file

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the issue, no errors.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17394 - exporting checkouts with items selects without items in combo-box
Fridolin Somers [Tue, 4 Oct 2016 10:36:11 +0000 (12:36 +0200)]
Bug 17394 - exporting checkouts with items selects without items in combo-box

In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.

This patch corrects by changing id and name of the export format combo-box : issues-table-output-format

TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> With patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17481: Fix incorrect merge of bug 11048 (logout redirection for CAS authentication)
Matthias Meusburger [Fri, 21 Oct 2016 15:04:58 +0000 (17:04 +0200)]
Bug 17481: Fix incorrect merge of bug 11048 (logout redirection for CAS authentication)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16493: [QA Followup] Restore title and author match as an option, make it the...
Kyle M Hall [Wed, 8 Jun 2016 10:53:25 +0000 (10:53 +0000)]
Bug 16493: [QA Followup] Restore title and author match as an option, make it the default

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
7 years agoBug 16493: acq matching on title and author
Kyle M Hall [Wed, 11 May 2016 14:19:41 +0000 (14:19 +0000)]
Bug 16493: acq matching on title and author

When you order from a staged file you're getting duplicate warnings that
are inaccurate.  For example, when you order a file of 50 DVDs for
example and they don't have ISBNs they're matching on the books. And
then you have to order them one by one.

This patch replaces the use of FindDuplicates with Koha's match point
system. This means you can select from the same match points defined
and used in the batch record importer, or you can opt to skip matching
altogether!

Test Plan:
1) Import a record with a title, isbn and author.
2) Delete the from the record and stage it again
3) Attempt to add it to a basket via the staged record
4) You should note the gives you the "No records imported" message
5) Apply this patch
6) Create a matcher for ISBN
7) Create a matcher for Author/Title
8) Attempt to add the record to your basket using the ISBN matcher
8) Koha should find no match and import the record to the basket
9) Stage the record again
10) Attempt to add the record to your basket using the Title/Author matcher
11) You should recieve the "No records imported" message.

Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov>
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
7 years agoBug 17518: Update DB rev (3.22.12.001)
Julian Maurice [Tue, 8 Nov 2016 10:34:34 +0000 (11:34 +0100)]
Bug 17518: Update DB rev (3.22.12.001)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17518: Displayed language name for Czech is wrong
Josef Moravec [Wed, 26 Oct 2016 22:53:04 +0000 (22:53 +0000)]
Bug 17518: Displayed language name for Czech is wrong

It's "Ceština" and should be "Čeština"

Test plan:
1) apply the patch
1.1) update database
2) install Czech translation for Koha
3) note the language name in language switcher (in staff client and
    opac) is right: "Čeština"

Signed-off-by: radiuscz <radek.siman@centrum.cz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit de2ba75c25f9f348a312093483dea52168fa5d6e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3ea0d7ed993a0c1233e822f7f4db710cb9056cfd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17504: Make the installer show the right dmbs help if wrong permissions
Tomas Cohen Arazi [Wed, 26 Oct 2016 14:34:08 +0000 (11:34 -0300)]
Bug 17504: Make the installer show the right dmbs help if wrong permissions

This patch changes the installer template for step 2 (DB rights check)
so it correctly displays MySQL-related message.
The previous code was doing the wrong comparisson, thus yielding
PostgreSQL documentation.

To test:
- Run:
  $ sudo koha-mysql kohadev
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
  > REVOKE INSERT ON koha_kohadev.* FROM 'koha_kohadev'@'localhost';
  > FLUSH PRIVILEGES; \q
- Run the webinstaller through step 2
=> FAIL: You get the message in the attached screenshot
- Apply the patch, reload
=> SUCCESS: You are displayed a different warning message, with a link
to up-to-date MySQL docs on GRANT
- Fix permissions for the user:
  $ sudo koha-mysql kohadev
  > GRANT ALL PRIVILEGES on koha_kohadev.* TO 'koha_kohadev'@'localhost';
  > FLUSH PRIVILEGES; \q
- Reload
=> SUCCESS: All checks are correct and you can move on
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1191ea4f448dd9ae994cf703e8e0a4970fdbb57e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 55e774f5d8d919a6142aac9bc06882de2a971f63)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 4880: Make koha-remove stop all instance's services
Tomas Cohen Arazi [Thu, 20 Oct 2016 14:58:32 +0000 (11:58 -0300)]
Bug 4880: Make koha-remove stop all instance's services

This patch makes koha-remove stop all instance's services before
attempting to remove the system user,

Before this patch, only zebra was stopped.

To test:
- Run:
  $ sudo koha-create --created-db favourite_name
- Run:
  $ sudo koha-remove favourite_name
=> FAIL: koha-indexer is still running for user favourite_name-koha
- Run:
  $ sudo koha-create --created-db another_name
  $ sudo koha-plack --enable another_name
  $ sudo koha-plack --start another_name
  $ sudo koha-indexer --stop another_name
  $ sudo koha-remove another_name
=> FAIL: koha-plack is still running for user another_name-koha
- Apply the patch
- Repeat the previous tests, with new names
=> SUCCESS: Everything works as expected :-D
- Sign off :-D

Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 607dac69a95e7bcb454661bfde71a45ee20d0155)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 275253e52a67c482665adb11e40d3a54554979cb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17434: Moremember displaying primary and secondary phone number twice
Josef Moravec [Tue, 18 Oct 2016 00:03:08 +0000 (00:03 +0000)]
Bug 17434: Moremember displaying primary and secondary phone number twice

Test plan:
1) Create patron category with category code "P" and create a patron
with this category
2) Fill in either the primary or other phone number
3) Go to patron details page (moremember.pl)
=> without patch you see primary/other phone duplicated
=> with patch you should see the number only once as expected

Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e17209de48f3c9d3184dfd430d882a4e8f8d5d4f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fa7eba3a3196c74345461934e7b5acca41be9802)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17417 [Revised] Correct invalid markup around news on the staff client home page
Owen Leonard [Mon, 10 Oct 2016 12:10:29 +0000 (08:10 -0400)]
Bug 17417 [Revised] Correct invalid markup around news on the staff client home page

This patch fixes two minor errors in the markup around displaying news
on the staff client home page: Adding a missing "class" attribute, and
changing the container around news items from <p> to <div> (because news
items might contain <p> and nesting them is incorrect).

To test, apply the patch and view the staff client home page with news
items showing. Validate the page and confirm that there are no errors.

Signed-off-by: Marc <veron@veron.ch>
Revision for QA removes an extra </div> from elsewhere in the template
to make the validator return no errors.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d08076e7e55a7c78a7ab3d79c33151dd4c469101)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 23e0c8ffb50c97553dfbc368b78f1d3e7a29bacc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16935 - launch export_records.pl with deleted_barcodes param fails
Fridolin Somers [Wed, 24 Aug 2016 09:44:55 +0000 (11:44 +0200)]
Bug 16935 - launch export_records.pl with deleted_barcodes param fails

When launching misc/export_records.pl with this command line :

 misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc

You get this error message :

DBD::mysql::db selectall_arrayref failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 4 [for Statement " (
            SELECT DISTINCT barcode
            FROM deleteditems
            WHERE deleteditems.biblionumber = ?
        "] at misc/export_records.pl line 189.

This is because of a '(' after 'q|', looks like a typo.
Also, this patch removes useless var $q.

Test plan :
- Delete an item with barcode
- Without patch, run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc
=> You get dirty MySQL
- Without patch, run the same command
=> No error and the file is generated

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dbab260afccc04fac8d088839d6017242c818917)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b57fb0a9b20333ce52536b319342c2dd5021e3da)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process
Fridolin Somers [Thu, 29 Sep 2016 14:19:48 +0000 (16:19 +0200)]
Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process

When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever.
But if something crashes inside the rebuild process, the all daemon crashes.
For example when it can not access database.
This problem may be temporary so daemon should keep running.

This patch add eval around the rebuild process to allow a run to fail without killing the daemon.
Also moves the DB handler get inside daemon loop because it is broken is DB stoppes.

This is a big issue for indexer running in a systemd service.

Test plan :
- run rebuild_zebra.pl in daemon mode :
/home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30
- stop the database
- wait a minute
=> you see an error on database connexion
=> the daemon is still running
- restart the database
- test the indexer by creating a new record (wait for a minute)

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bfcc7cad70bfc23163865b2ff39eb592d6d9d152)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit db1bf801e6ad9f9f051d51672a744179beb48bc8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17375: Search by dateofbirth - handle invalid dates
Jonathan Druart [Tue, 4 Oct 2016 10:55:25 +0000 (11:55 +0100)]
Bug 17375: Search by dateofbirth - handle invalid dates

Prevent internal software error when searching patron with invalid birth date

To reproduce:

- Go to Home > Patron
- Expand patron search (click on + at the left of the search button)
- In drop down 'Search fields', select 'Date of birth'
- Enter a valid date (e.g. 11.02.1995 if syspref 'dateformat' is set to dmydot)
Result: Search works OK
- Enter an invalid date, e.g. 11.02 or abcd...
Result: Internal server error

- Do a patron search with many results
- Use filter on results screen, select 'Date of birth' as search field and
  enter an invalid date to search (e.g. 'a')
Result: Endless message 'Processing'

To test:
- Apply patch
- Repeat steps above
- In both cases, you should get "No results"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9b34b07d62588713405f31481cb363661b1a5d0c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0d9e1667bfc64a3d6dfaefacf304f329549c0bf4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17375: Search by dateofbirth - Add tests
Jonathan Druart [Tue, 4 Oct 2016 10:55:02 +0000 (11:55 +0100)]
Bug 17375: Search by dateofbirth - Add tests

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 12167c57d0608637504a011627a0256e28e515cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 41a1796ab19c6aef05d58b75a5c6a32ae9c04c21)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoIncrement version for 3.22.12 release v3.22.12
Julian Maurice [Mon, 24 Oct 2016 12:11:11 +0000 (14:11 +0200)]
Increment version for 3.22.12 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoUpdate release notes for 3.22.12 release
Julian Maurice [Mon, 24 Oct 2016 12:09:57 +0000 (14:09 +0200)]
Update release notes for 3.22.12 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoTranslation updates for Koha 3.22.12
Julian Maurice [Mon, 24 Oct 2016 11:53:45 +0000 (13:53 +0200)]
Translation updates for Koha 3.22.12

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17154 (QA followup) replace tabs with spaces
Nick Clemens [Fri, 14 Oct 2016 08:52:54 +0000 (08:52 +0000)]
Bug 17154 (QA followup) replace tabs with spaces

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1e17c92905143f6bc8cac38f00256541c7146fa3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f4b6b70f70b65bdcd948f6880f779b66c02a1ded)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17154 : Note column is missing on account lines receipt
Sophie Meynieux [Mon, 22 Aug 2016 10:02:11 +0000 (12:02 +0200)]
Bug 17154 : Note column is missing on account lines receipt

    When displaying Fines > Account tab for a patron, you can see on screen a Note column that is missing if you click on Print

    Test plan :
    * Find a patron with accountlines or add them manually (Create manual invoice/credit).
    * Be sure some of them got a Note
    * Clik on Print fior those lines

    Without patch, the printed receipt does not show the Note column
    with the patch, the printed receipt shows a Note column and Note content is correctly printed for accountline with a note.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 734d08c2af16909f96b19003c4cc1d758b74f11d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a8dbb0cae8c5ca7e36ef9a2a3f2dc6b4474e64bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17404: Patron deletion page: Fix title and breadcrumb
Marc [Wed, 5 Oct 2016 14:08:52 +0000 (16:08 +0200)]
Bug 17404: Patron deletion page: Fix title and breadcrumb

Title and breadcrumb of patron deletion page (deletemember.pl) say:
"Can't Delete Patron". This should be changed to "Delete patron".

To verify:
- Go to a patron's detail page
- Toolbar : More : Delete
Result: You get a question: "Are you sure...", but title and breadcrumb say:
  "Can't Delete Patron" rsp "Cant delete patron"

To test:
- Apply patch
- Repeat steps above.
- Verify that title and breadcrumb display properly, including patron's name

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9a81a138d45b245b69754f3e61115d5d997510c0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 14d5f19b9ee100c81b33414ffd58eac668c08823)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17411: Remove 3 other occurrences of exit 1
Jonathan Druart [Tue, 18 Oct 2016 16:14:58 +0000 (17:14 +0100)]
Bug 17411: Remove 3 other occurrences of exit 1

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f1a8ca13028411384847615fbdeeaaedd9703382)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5c324d8201fff6e3a727c95e182ad32b78ccf715)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17411 - Change exit 1 to exit 0 in acqui/basket.pl to prevent Internal Server...
Marc [Thu, 6 Oct 2016 12:37:14 +0000 (14:37 +0200)]
Bug 17411 - Change exit 1 to exit 0 in acqui/basket.pl to prevent Internal Server Error

Note: Same situation as in Bug 17403

To test:
- Verifiy that code change makes sense.

Note: Same situation as in Bug 17403
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Remove unecessary comment

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 01636dca2f1bd132fcc8d16f7a91fa4a45a90668)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f3889059133d5e9933325c98e172d4d0b1e69c11)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16245: [QA Follow-up] Replace typeofrecord2 by biblevel
Marcel de Rooy [Fri, 14 Oct 2016 08:01:12 +0000 (10:01 +0200)]
Bug 16245: [QA Follow-up] Replace typeofrecord2 by biblevel

Position 7 of the leader is better referred to as biblevel.
(Pos 6 is record type.)
At the same time replacing some regex's by simple eq's.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
It seems that bib level in the UNIMARC leader only allows a subset of
the possible combinations for MARC21. This does not have bad side-effects
however in the new code that tests bib level to determine the type tag.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 556a4870d6beced7df52dbbc2ad472769e79e148)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6b02b7404dbaf4a9c266cdc6a23ddba829ffdf81)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16245: RIS export file type incorrect
Hector Castro [Wed, 28 Sep 2016 21:29:37 +0000 (15:29 -0600)]
Bug 16245: RIS export file type incorrect

When exporting lists to a RIS file, the TY field of the RIS file is always
'book' even if the item being exported is a journal or serial.
Since unimarc and marc21 is coded in Koha, just a few references types are
included. This needs a much better code.

This bug changes only TY BOOK result. Other resources needs a case by case
basis.

To test:
-In advanced search limit by itemtype (books, music, continue resources, etc).
-Search and save result in Cart
-Export to RIS Format and notice about the new TY change with all materials
-Export record in bib record details page in OPAC and Intranet.
-Confirm that works as expected.
-Bonus test:
-Try to import the  RIS file in  http://www.myendnoteweb.com if you
have account or create one.
NOTE: According with previous comment, some values has changed.

Sponsored-by: Universidad de El Salvador
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>
(cherry picked from commit a74329af022eeb857e1f936c13274c0e41497472)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 14b662558019a4b3c1ff3923a8455f43fc878233)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17426: Do not set AutoCommit in tests
Jonathan Druart [Tue, 11 Oct 2016 12:15:27 +0000 (13:15 +0100)]
Bug 17426: Do not set AutoCommit in tests

  git grep AutoCommit t | grep 1

highlights that 1 test use AutoCommit set, it should not

The other change removes the FIXME should has been fixed.

Test plan:
  prove t/db_dependent/BackgroundJob.t
  t/db_dependent/Patron/Borrower_Discharge.t

should still return green

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ede157e9c09e08b772aaaaacd1a7eb64a2ecc9f6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 106c66eee67be65246ee50ea59a4c0f27acf7e7e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17405 Edit record uses Default framework
Rodrigo Santellan [Mon, 10 Oct 2016 08:20:12 +0000 (04:20 -0400)]
Bug 17405 Edit record uses Default framework

In detail view (catalogue/detail.pl), when clicking on Edit > Edit
record button, the record editor should be opened with the biblio record
framework. It isn't the case. The Default framework is used. Same issue
with Edit > Edit as new (duplicate).

TO TEST:

1. Find a biblio record using a framework which is not the Default one.
2. See the biblio record in detail view (catalogue/detail.pl).
3. Click on Edit > Edit record.
4. Click on Settings => you can see 'Default' as selected framework.
5. Apply the patch.
6. Repeat step 3-4. => the biblio record framework is selected.
7. Repeat 3-4 using Edit > Edit as new (duplicate).

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Added a test plan

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the issue, 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 f060709df0ed07c0ff3dbc20404fa5b3b2aa8651)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8659bad629fcdfb5bb612ad21ce0bcb0f70a74bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17393: Fix non-Latin chars handling in self reg
Jonathan Druart [Tue, 4 Oct 2016 07:29:30 +0000 (08:29 +0100)]
Bug 17393: Fix non-Latin chars handling in self reg

If you fill the patron self reg with non-latin characters, they will be
encoded with HTML entities (&eacute;)
This bug leads to generate a userid with weird behaviors:
é => eacute
ł => x

Test plan:
0/ Do not apply the patch
1/ Set up the Self reg feature
2/ fill surname, fistname with something like "Michał pouéàç"
3/ Save
4/ See the bad encoding/replacement on the screen and look at the data
The accentued chars are replaced with their html representation and the
non-Latin chars with a 'x'
in the DB
5/ Apply this patch
6/ Repeat steps 2, 3
7/ Everything should be ok
8/ Try to make sure this HTML::Entities escape was not useful:
fill surname with "surname <script>alert("xss?")</script>"
Save and look at the data

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 35de8aa1ef07b04cfc7c977f7168cd36b40d7941)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e25934f6cdb1eaae0fbc9be15afe55a3ee2ad51a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17477: Duplicating a subfield yields an empty subfield tag
Hector Castro [Thu, 20 Oct 2016 14:57:46 +0000 (08:57 -0600)]
Bug 17477: Duplicating a subfield yields an empty subfield tag

The problem only when clone a textareas in 5XX

Steps to reproduce error:
- On the cataloging screen (basic screen), create a new record
- Go to the 5xx fields
- Put something on the 521$a subfield or other textareas (e.g. 520$u or
 583$x)
- Clone the subfield
=> FAIL: The subfield correctly doesn't include the original data,
BUT it doesn't have the subtield tag either.

- Apply patch
- Clean cache browser and reload page
- Repeat steps above
- Verify that works as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fbe75e66ccb93a6a4d973e3066ca1ebad169a5b6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 90e9ab941eb47b0be4f859c45d394575324b5fc7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17367 - Showing all items must keep show holdings tab in OPAC details
Fridolin Somers [Wed, 28 Sep 2016 12:49:32 +0000 (14:49 +0200)]
Bug 17367 - Showing all items must keep show holdings tab in OPAC details

In OPAC details page, when record as too many items (depending on syspref OpacMaxItemsToDisplay), they are not displayed in holdings tab.
You can click on link "Click here to view them all" to show them : page reloads with a new arg viewallitems=1.
Also you can choose which tab is shown by default using syspref opacSerialDefaultTab.

The bug is that when default tab is not holdings, clicking on link to show all items will show another tab. So one must reclick on holings tab to see all items.

This patch corrects by forcing holdings tab when arg viewallitems is defined.

Test plan :
- Create a serial record with more items than syspref OpacMaxItemsToDisplay (or decrease this syspref)
- Select "Subscriptions tab" for syspref opacSerialDefaultTab
- Go to opac details on this record : /cgi-bin/koha/opac-detail.pl?biblionumber=xxx
=> You see Subscriptions tab selected
- Click on Holdings tab
=> You see no items but a link "Click here to view them all"
- Click on this link
=> Without patch you see Subscriptions tab selected
=> Wih patch you see Holdings tab selected and the items

Signed-off-by: Juliette <juliette.levast@iepg.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f1298dc7828757fe9277a5128910335d2d6c0f2c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2a62a9a18cc3a36288e6abf3586a7e606e6e07db)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17423 - patronimage.pl permission is too restrictive
Fridolin Somers [Tue, 11 Oct 2016 08:00:56 +0000 (10:00 +0200)]
Bug 17423 - patronimage.pl permission is too restrictive

Bug 14566 added the permission "borrowers" on patronimage.pl.
This perm is too restrictive because circulation pages also uses this page.

I propose to simply use "catalogue" perm.

Test plan
- Set an image to borrower xx
- Create a user with only catalogue permission
- Log with this user
- Go to page (replace xx by borrower number) : /cgi-bin/koha/members/patronimage.pl?borrowernumber=xx
=> Without patch you get the page saying you do not have the permission
=> With patch you get the image
- Log out and retest the page patronimage.pl
=> You get 403 error

Signed-off-by: remy <remy.gonzalves@iepg.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e78f81d615a79ad293d599c7395efcabd267662d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f620fbe0d9ec8c4df258dd3a35b839b466479d52)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16358: Do not redirect to the editor when deleting records
Jonathan Druart [Tue, 13 Sep 2016 14:03:55 +0000 (15:03 +0100)]
Bug 16358: Do not redirect to the editor when deleting records

The "Delete record" button goes to addbiblio.pl?op=delete, which
incorrectly redirects to Rancor when selected.

Test plan:
0/ Enable EnableAdvancedCatalogingEditor
1/ Edit a record
2/ Switch to the Advanced editor
3/ click on "View the record"
4/ Delete the record
=> Without this patch you are redirected to the editor
=> With this patch you are redirected to the advanced search

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ba8ee98e1bb3b18f579c0b122b14d43e88cda2c8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 537d7d9fa4650aa35b8e20cbaf0cad7f7a4d2ba4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17446: Typo seleted
Marcel de Rooy [Fri, 14 Oct 2016 09:29:44 +0000 (11:29 +0200)]
Bug 17446: Typo seleted

Built on top of bug 17441

Test plan:
Just have a look at the changes. Trivial.
Git grep seleted. No results.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f75afef59175933f7e93b04bdcbdcf5180b0b024)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 28eb0a880e2bf249da464f7da75ad409f9ffc919)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17441: [QA Follow-up] Return value of SendAlerts
Marcel de Rooy [Fri, 14 Oct 2016 09:07:49 +0000 (11:07 +0200)]
Bug 17441: [QA Follow-up] Return value of SendAlerts

This patch makes the return value of SendAlerts more consistent.
It returns 1 on success, or undef || { error => 'msg' } on failure.
Needed to adjust one test in Letters.t too.
Adjusted one typo along the way (seleted).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by running Letters.t.
Also tested SendAlerts from the interface with AutoEmailOpacUser and
memberentry (adding new patron).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17e2e6c994655aaa927b2579524022a4f24a8d1d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 18a472e627e8f8b7cec45ffe90f896374d90fb9d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17441 - t/db_dependent/Letters.t fails on Jenkins
Katrin Fischer [Thu, 13 Oct 2016 17:05:48 +0000 (19:05 +0200)]
Bug 17441 - t/db_dependent/Letters.t fails on Jenkins

Run prove t/db_dependent/Letters.t

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
To improve consistency, adding a follow-up.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ff495c5fa8c58a7762b3494e97d90618d649f7a8)
(cherry picked from commit 4ee9399028fda3f5b8cfbfd9c43eb50349569e91)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11217: The # in accountlines descriptions makes them un-writeoffable
Marc [Fri, 7 Oct 2016 09:03:45 +0000 (11:03 +0200)]
Bug 11217: The # in accountlines descriptions makes them un-writeoffable

This patch adds escaping to url params in mambers/pay.pl

To test:
- Apply patch
- Go to Home > Patrons > Manual invoice and create an invoice with a
  description containing a #
- Go to tab "Pay fines"
- Write off the fine
Expected result: Fine is written off and does no longer display in pay tab.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 692014c817b58876042ab03d71bde0c2cce7e571)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ff2b5116e9edb5ce62212a8f25518bc1647b19b9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17365: Fix XSS in moremember.pl and memberentry.pl
Jonathan Druart [Thu, 29 Sep 2016 07:46:49 +0000 (08:46 +0100)]
Bug 17365: Fix XSS in moremember.pl and memberentry.pl

There are certainly hundred of places where they are not escaped...

Test plan:
Create a patron with "Arun <script>alert('code injection');</script>" in
some of the fields.

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 1d0d5f1398687ead3a17cd40f74f879e8ddf9a9d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a61c072f1acb77906843a5be319412f959374bda)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17389: Clear logs
Jonathan Druart [Mon, 3 Oct 2016 14:23:39 +0000 (15:23 +0100)]
Bug 17389: Clear logs

Logs are full of:
Use of uninitialized value in substitution (s///) at
C4/ImportExportFramework.pm line 282.
Use of uninitialized value in concatenation (.) or string at
C4/ImportExportFramework.pm line 283.

Some field are NULL in DB, we need to init the value to an empty string
to avoid these warnings.

Note: This fix is not related to the original bug
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Warnings avoided

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a1dcd2f2e67f2dc998d2eae0fc6097eb9edbb874)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4592382e388d7f0ee0467180b50b5630a19c674a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17389: (bug 16035 follow-up) Fix export non-default frameworks
Jonathan Druart [Mon, 3 Oct 2016 14:15:40 +0000 (15:15 +0100)]
Bug 17389: (bug 16035 follow-up) Fix export non-default frameworks

Trivial patch, no need to explain anything :)

Test plan:
Export default framework
Export other frameworks
=> The frameworkcode column should contain the framework code

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a1eeffd8385e5b95ca1d06a8300e5bd42403486a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5cf95dc6db4356dd5fbb1d9c46c50652d508a19b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17392 - opac/svc/overdrive_proxy is not plack safe
Nick Clemens [Wed, 5 Oct 2016 13:26:09 +0000 (13:26 +0000)]
Bug 17392 - opac/svc/overdrive_proxy is not plack safe

This patch simply replaces the ';'  in the param passed to OverDrive
with '&'

To test:
1 - Enable overdrive (requires an account)
2 - Perform an opac search
3 - Note the number of overdrive results reported
4 - Click the link to view the actual overdrive results
5 - Note the result numbers don't match
6 - Apply patch
7 - Repeat 1-4 and note results numbers match and results are relevant
8 - Test a search with a ';' to ensure this patch isn't breaking
searches

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Verified by reading code - couldn't verify using Overdrive.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f28460bdb7cbb6a1261d8c50af6b10ffacf54ef3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 80de7080ef5f3694378c4a909b96ee62866d0b41)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17357: Update DB rev (3.22.11.003)
Julian Maurice [Mon, 24 Oct 2016 09:52:46 +0000 (11:52 +0200)]
Bug 17357: Update DB rev (3.22.11.003)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17357: Replace WTHDRAWN with WITHDRAWN in installer files
Jonathan Druart [Tue, 27 Sep 2016 09:52:17 +0000 (10:52 +0100)]
Bug 17357: Replace WTHDRAWN with WITHDRAWN in installer files

Some installer files still use WTHDRAWN instead of WITHDRAWN as an AV
category.

Test plan:
  git grep WTHDRAWN installer
should not return any results

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ce076e0e757ff812eba21ee6102e6c44076e5595)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 78ce2bcb9f2217d5142a3257ff02ca647dd0ecac)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17358: Rename COU with COUNTRY and LAN with LANG
Jonathan Druart [Tue, 27 Sep 2016 12:38:34 +0000 (13:38 +0100)]
Bug 17358: Rename COU with COUNTRY and LAN with LANG

Some installer files use COU and LAN instead of COUNTRY and LANG.

To uniformise these AVs, it would be good to use the same code.

Note that I do not think we should update existing installations

Carefully compared code.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 75a900d55365dc6a8d1396b68329a0679d9dc430)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit aa231539854fe9aa0ef75daca342c8cced0b8150)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17403: Internal Server Error while deleting patron
Marc [Wed, 5 Oct 2016 13:43:29 +0000 (15:43 +0200)]
Bug 17403: Internal Server Error while deleting patron

This patch fixes a Internal Server Error while deleting patrons.

To reproduce:

- Go to a patron's detail page
- Toolbar : More : Delete
- Confirm "Are you sure you want to delete..."

Result: Internal Server Error
Plack error log:
exited nonzero: 1 at /home/marc/koha/members/deletemem.pl
Note: Patron is deleted

Additional tests: Try to delete yourself, to delete a staff member
without having superlibrarian permission etc.

To test:

- Apply patch
- Re-start plack
- Try to reproduce steps above (with other patron)
Expected result:
No Internal Server Error, Redirect to Home > Patrons

Amended to include all occurences of 'exit 1'

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Marc

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b588babdb23bfdc1163864a26c36a61bf8a39ae5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0e953489908f8fb44bd6173620050054e0a66e71)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages
Andreas Roussos [Sat, 17 Sep 2016 10:44:47 +0000 (13:44 +0300)]
Bug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages

In the Staff client, under Circulation > Renew, the message shown after
successful renewal of an item contains broken URLs. This is also true for
the message shown when you try to renew an item that is not checked out.

This patch fixes that.

Test plan:
1) Go to Circulation > Renew, and search for the barcode of a checked-out
   item. In the 'Item renewed:' confirmation message, notice how the URLs
   for the title and the barcode are broken.
2) Now search for the barcode of an item that is not checked out. In the
   'Cannot renew:' message, notice how the URLs are broken here too.
3) Apply the patch.
4) Repeat steps 1) and 2). This time the URLs work fine.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 884e28fab5e4db86dd9f50f2908519a0cd6650d5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2f70fde91a53b5a8e05c99fa51c77ba263e9d38c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: Add tests to cover the changes
Jonathan Druart [Tue, 4 Oct 2016 13:49:19 +0000 (14:49 +0100)]
Bug 17088: Add tests to cover the changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit bc1e23e1f11e146e282d0e2efa7fd77e2c26d631)
(cherry picked from commit 1c35b86c2e7b7dd00bf677f51d8a141e3c281072)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: [Follow-up] Use Logger for failed exports
Marcel de Rooy [Fri, 16 Sep 2016 09:27:05 +0000 (11:27 +0200)]
Bug 17088: [Follow-up] Use Logger for failed exports

Fixes a TODO for logging unsupported record_type in _get_record_for_export.
Also logs a warning when the record_type parameter is not supplied at all in sub export.
Replaces a warn by a log message about an invalid record for format iso2709.
Also adds a log message about an invalid record for format xml.
Adds a trivial unit test for passing no record_type to export.

Test plan:
See also first patch.
Run t/db_dependent/Exporter/Record.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Also tested the log messages for iso2709 and xml by manipulating
the record_type parameter with:
    $params->{record_type}='xx';
before calling _get_record_for_export in Record.pm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0eec191ed3ab1ae1bd24972a559d12627b70f681)
(cherry picked from commit 40a2b8c12150d6fe193ba10c808b47069494157a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088: [Follow-up] Adjust POD in Logger.pm
Marcel de Rooy [Fri, 16 Sep 2016 08:44:47 +0000 (10:44 +0200)]
Bug 17088: [Follow-up] Adjust POD in Logger.pm

Not important enough to go on its own.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 44b51ed80224d0361796c1a70cb66bb5096a427c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 051661024ca92a343ad74e2664627c070bb5c66e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17088 - Bad MARC XML can halt export_records.pl
Kyle M Hall [Tue, 9 Aug 2016 13:08:17 +0000 (13:08 +0000)]
Bug 17088 - Bad MARC XML can halt export_records.pl

If export_records.pl encounters a record that fails to load correctly as
a MARC::Record the export process will fail and only the records
encountered up to that point will be exported.

Test Plan:
1) Pick a record in your database, and replace the biblioitems.marcxml field with some random characters
2) Export your records using the command:
   misc/export_records.pl  --format xml --record-type bibs --filename /tmp/biblios.xml
3) Note you get an error and the script ends prematurely
4) Apply this patch
5) Repeat step 2
6) Note the full record set is exported ( except for your bad record )
7) Note an error is still generated for your bad record ( useful for
    tracking down bad records ).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e72a8ab260abed11b02266d77bc17d831884ed40)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cb1ee8e3ccbc8bbce47b9db502a90c09e2a6ec3f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by...
Mason James [Wed, 3 Aug 2016 04:32:00 +0000 (16:32 +1200)]
Bug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by default

to test bug...
 1/ make a random user
 2/ change to random user
 3/ access any zebra database with random user and no authentication
 4/ read zebra database

here is a transcript of the bug...
---------------------------
root@xen1:~# adduser bob
root@xen1:~# su -l bob

bob@xen1:~$ cd /var/lib/koha
bob@xen1:/var/lib/koha$ ls
topsecret

bob@xen1:/var/lib/koha$ yaz-client  unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 81
Name   : Zebra Information Server/GFS/YAZ
Version: 4.2.30 98864b44c654645bc16b2c54f822dc2e45a93031
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.001002

Z> base biblios;

Z> find the
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1130, setno 2
SearchResult-1: term=the cnt=1130
records returned: 0
Elapsed: 0.005518

Z> show
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: USmarc
01824cam a2200397 a 4500
001 000045782309
003 AuCNLKIN
005 20111013213222.0
008 100707s2011    maua          001 0 e
...
---------------------------

5/ apply changes to a Koha instance's config files, that you plan to test

6/ restart zebra for instance
 # sudo koha-restart-zebra topsecret

7/ repeat steps 2 and 3, but receive a 'bad user/passwd ' error from zebra

bob@xen1:~$ yaz-client unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection rejected by v3 target.
    1: code=1011 (Init/AC: Bad Userid and/or Password),

NOTE: this patch currently will only fixes newly created instances, it wont fix existing instances
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Mason

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f2196a2e4f21a9a294c970a1ad067f5c3d1cb4eb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f3917fc8cb8c49bc85e7d371043cae8bd276063d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17324: Deal with branchcode NULL issue
Mark Tompsett [Tue, 20 Sep 2016 23:29:28 +0000 (19:29 -0400)]
Bug 17324: Deal with branchcode NULL issue

In a database update we alter the letter table, making a column
(branchcode) not be able to contain NULL values.
However if it already does, this SQL fails. So before changing the
column we change the NULL values

[Tue Sep 20 19:08:10 2016] updatedatabase.pl: DBD::mysql::db do failed:
Invalid use of NULL value [for Statement "
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: ALTER TABLE letter MODIFY
COLUMN branchcode varchar(10) NOT NULL DEFAULT ''
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: "] at
/home/mtompset/kohaclone/installer/data/mysql/updatedatabase.pl line
12638.

Reproduce:
on an ubuntu 16.04 LTS machine with MySQL 5.7 install git koha
development environment.
...
git checkout -b my_3.18.x origin/3.18.x
drop database koha_library;
create database koha_library;
quit;
web install all sample data
(ignore some issues with sample data, and one with mandatory)

git checkout -b bug_17234 origin/master
git bz apply 17292
git bz apply 17320
git bz apply 17260
git bz apply 17234
web install
Two warning messages are expected output from upgrade process, but
the above message is not.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not follow the test plan, but the changes make sense

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0599ab00768e7d2ee487c6d02a0230d4a2a96d9e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3c2bd4ef3b1cc45d955940c1323c2b2c9b05cc4a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
Kyle M Hall [Sat, 24 Sep 2016 19:25:33 +0000 (19:25 +0000)]
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl

The patron search type is hard coded to 'contain' in
circ/circulation.pl.

This causes problems because a mis-scanned cardnumber can bring up the
wrong patron.

The example that our partner gave us involved scanning '1733', which
doesn't match any borrowers when we do a 'start_with' search, but
matches the cardnumber 'p291733'.

If we follow the usage in members/member.pl, we can set searchtype in
HTTP params, which is amenable to fixes in intranetuserjs

Test Plan:
1) Apply this patch
2) Use the checkout search, not changes should be noted

Extra credit:
1) Add javascript to intranetuserjs to add a hidden input named
'searchtype' with the value 'start_with'
2) Checkout searches should now give only results where a searched
   field starts with the given string(s)

Signed-off-by: Josef Moravec <josef.moravec@gmail.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 56da7be50ada38bab6ec866f5915d55507c7d821)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 26efec07d7344ecf3c29981e735246dec6416bd1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Update DB rev (3.22.11.02)
Frédéric Demians [Sat, 22 Oct 2016 07:16:44 +0000 (09:16 +0200)]
Bug 7045: Update DB rev (3.22.11.02)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Update default value placeholders for existing installs
Jonathan Druart [Tue, 16 Aug 2016 08:18:19 +0000 (09:18 +0100)]
Bug 7045: Update default value placeholders for existing installs

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 547b5f95f62a00e360c5cac4e416d30365429fcb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 517e4eb553e31dad4d7d49a6c2b2222884423d75)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7045: Use <<tag>> for default value placeholders
Jonathan Druart [Tue, 16 Aug 2016 08:09:53 +0000 (09:09 +0100)]
Bug 7045: Use <<tag>> for default value placeholders

When adding a biblio, the default value of a MARC subfield defined in
the frameworks can be used as placeholders to set the current date or
the surname of the logged in user (use cases?).
The different placeholders are 'YYYY', 'MM', 'DD', 'user'.
When adding an item, same behavior except that 'user' is not replaced.

This patch makes behaviors consistent between the 2 editors and
surrounds placeholders with << >>
We will now have: <<YYYY>>, <<MM>>, <<DD>> and <<USER>>

Test plan:
Define default values for biblio and item subfields.
Create a bibliographic record and attach it an item.
The default values should be used and replaced if you used placeholders.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50abf24ff04aae0c9010411fa6e98561c2ccc66f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 60ab0769530c190dcd849f15909eed4961aa8a83)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16035: MARC default bibliographic framework Export fix
Julian Maurice [Mon, 24 Oct 2016 09:04:39 +0000 (11:04 +0200)]
Bug 16035: MARC default bibliographic framework Export fix

This patch makes sure that, if there is no framework code,
     $frameworkcode is set to 'default'. This fixes the format issue.
     Then, if $frameworkcode = default, an empty string (rather than
     null) is passed to the ExportFramework method, as the framework
     code in the DB for default codes is "".

To test:
1) Go to Admin -> MARC Bibliographic framework
2) Try to export default framework in all formats, notice the file is
only exported as .ods and is an empty file. Notice warns in intranet
error log.
3) Apply patch and refresh page
4) Confirm exporting default framework works in all formats and
spreadsheet has data
5) Notice warns in error log are gone
6) Confirm export still works for other frameworks

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 705097f938ba9334c21b3e6f006bd7c9ba38763c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1de610bb63f70b9f4a1e3a8a5683de5d3bb7bb12)
Signed-off-by: Julian Maurice <koha@matrix-jessie>
8 years agoBug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache
Andreas Jonsson [Mon, 3 Oct 2016 08:08:03 +0000 (09:08 +0100)]
Bug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache

The problem is that the memcached configuration variables are extracted
from the apache configuration file incorrectly so you get
'"127.0.0.1:11211"' including double quotes as the servers parameter to
memcached.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note this only applies on 3.22.x but it does fix the problem
Definitely needed for 3.22.12

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0fc92ab72d1bab7e84df9fc78e3cbd3f2abb3d97)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707: Update DB rev (3.22.11.001)
Frédéric Demians [Sun, 25 Sep 2016 14:02:13 +0000 (14:02 +0000)]
Bug 14707: Update DB rev (3.22.11.001)

(cherry picked from commit c73b60d7168f7f00226d01b09c604f253f35c36c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707: Update existing installations and correct wrong values
Jonathan Druart [Wed, 14 Sep 2016 10:07:58 +0000 (11:07 +0100)]
Bug 14707: Update existing installations and correct wrong values

See http://hea.koha-community.org/, the countries are filled is wrong
values.
If we decide to update the free text with a dropdown list, we need to
handle these wrong data.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 66d669d0735f244cb30e9cfdf53f91c77953b30f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e09f10a882d15118bd22789462b2d66f4b1a4dfb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14707 : Replace UsageStatsCountry syspref from free text to a dropdown list.
Julian FIOL [Tue, 18 Aug 2015 15:16:53 +0000 (17:16 +0200)]
Bug 14707 : Replace UsageStatsCountry syspref from free text to a dropdown list.

This will avoid syntax problems with Hea when a user will fill this 2 sysprefs

The default choice for UsageStatsLibraryType and UsageStatsCountry is 'empty'

Test Plan
---------

1. Create a new Koha install
2. Go to the 'Administration' page
3. Go to 'Global system preferences'
4. Go to 'Administration'
5. At the end of this page you should see a dropdown menu for
- UsageStatsCountry with all countries
- UsageStatsLibraryType with all type of library
They both should be empty by default.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Not a complete list but is a start
Lots of new strings to translate :)
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 233dfb8c74ce85bdb70bd1eb17231a234387d3c9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 20db7d6ee679f519a2076614635af831f3164c26)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13405 - System information has misleading information about indexing mode
Zeno Tajoli [Mon, 19 Sep 2016 15:03:20 +0000 (17:03 +0200)]
Bug 13405 - System information has misleading information about indexing mode

With this patch when <zebra_bib_index_mode> or <zebra_auth_index_mode> are set to 'grs1'
it appears a link to https://wiki.koha-community.org/wiki/Switching_to_dom_indexing
instead of a misleading information.

To test:
a)Insert 'grs1' in <zebra_bib_index_mode> or <zebra_auth_index_mode> (file koha-conf.xml)
b)It appers a  misleading warning
c)Apply the patch
d)It appears a link to https://wiki.koha-community.org/wiki/Switching_to_dom_indexing.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cdac530034a6b478b95e2d99ddc171529ee1a6c7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4e8209d595137168667d81875d024e6954fea102)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17289: Holds awaiting pickup shows date unformatted
Andreas Roussos [Sat, 10 Sep 2016 08:54:06 +0000 (11:54 +0300)]
Bug 17289: Holds awaiting pickup shows date unformatted

In the Staff client, under Circulation -> Circulation reports,
the date shown in the heading of the 'Holds awaiting pickup'
report is not formatted according to the 'dateformat' system
preference.

This (trivial) patch fixes that.

Test plan:
1) In the Staff client, go to Circulation and under 'Circulation
   reports' click on 'Holds awaiting pickup'
   (cgi-bin/koha/circ/waitingreserves.pl).
2) Observe that the date shown in the heading is always formatted as
   yyyy-mm-dd regardless of the value of the 'dateformat' syspref.
3) Apply the patch.
4) Re-visit the 'Holds awaiting pickup' report. Confirm that the patch
   worked, i.e. the date shown in the heading is formatted according
   to the 'dateformat' system preference.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f9e3639da7ef02a6ca08014179d216e1d938a401)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b0949e921427decf879e8e20d26bf42fefce992d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17245: Untranslatable abbreviated names of seasons.
Rafal Kopaczka [Sat, 3 Sep 2016 16:06:47 +0000 (18:06 +0200)]
Bug 17245: Untranslatable abbreviated names of seasons.

Because seasons strings are not available through DateTime module,
names of them where added in code, and templates. Bug 16289 adds new
abbreviated form to the code, but not to the templates. This patch
should fix the problem.

To test:
1. Apply patch.
2. Run "misc/translator/translate update" for you language.
3. Check if names are in po/ file for language.
4. Check if generating next issue for serial and prediction patterns
works correct.

NOTE: or "create {language code}" instead of update.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4da3bf5e48fa3462d2f3eca0f3c45f64dc9bb5b2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c81350b6200ce62c180f6fd301ed3406db893835)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 10768 - Improve the interface related to itemBarcodeFallbackSearch
Andreas Roussos [Thu, 15 Sep 2016 08:37:19 +0000 (11:37 +0300)]
Bug 10768 - Improve the interface related to itemBarcodeFallbackSearch

When the itemBarcodeFallbackSearch syspref is on, the wording in the
interface should reflect that you can enter a barcode OR a keyword.
Additionally, in the results of a keyword search the "Fast cataloging"
link should be more descriptive. This patch fixes these issues.

Test plan:

0) [PREREQUISITES] Ensure you have a Fast Add ('FA') framework defined,
   and that your itemBarcodeFallbackSearch syspref is set to 'Enable'.
1) Go to Circulation -> Check out, search for a patron, then select a
   patron to Check out. Notice how the text above the textbox reads
   "Enter item barcode:".
2) Type something generic (not a barcode) in the textbox so that you'll
   get at least one item as a result. Notice how the text in the yellow
   warning box reads "The barcode was not found: <terms> Fast cataloging".
3) Apply the patch.
4) Repeat step 1), now the text above the textbox should read
   "Enter item barcode or keyword:".
5) Repeat step 2), now the text in the yellow warning box should read
   "The barcode was not found: <terms> Add record using fast cataloging".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6fc03f1968f9e405d745b854577c953106fdbdfe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 68c21aabe99fb12ef3987a142f5cc0389422a7bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16816: Do not copy parameters used when duplicating a report
Jonathan Druart [Tue, 13 Sep 2016 13:41:51 +0000 (14:41 +0100)]
Bug 16816: Do not copy parameters used when duplicating a report

If a report is duplicated from the report list, the new report will
contain the tag (<<YEAR>> for instance), but from the reports results
page it copies the values used for the results.

Test plan:
Create a new sql report with tags
Duplicate it from the report list: no expected changes
Run it and duplicate it: the tags must not have been replaced

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Ran and duplicated a report, the tags remained intact.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 50a37fbf5bc22bed843447be6a6603e7705fd28d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fefd457550597e2bbcfda1317760c99852829ed2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17296: Display warning if AnonymousPatron is not correctly set
Jonathan Druart [Wed, 14 Sep 2016 12:39:34 +0000 (13:39 +0100)]
Bug 17296: Display warning if AnonymousPatron is not correctly set

Bug 14655 added a warning to the about page ("System information" tab)
if the AnonymousPatron feature is not correctly configured.
But actually there is one case when it's not displayed.

Test plan:
Set AnonymousPatron to a non existing patron
Set at least 1 borrowers.privacy == 2
go on the about page.
Without this patch you do not get the warning
With this patch you will see "Some patrons have requested a privacy on
returning item but the AnonymousPatron pref is not set correctly. Set it
to a valid borrower number if you want that this feature works
correctly."

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a2d804a8094ea05199803593698b4294f029913)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 92d648f579fb03e1e5bed45e28c8604a2ea7aab0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17294: Make reserves_stats.pl plack safe
Jonathan Druart [Tue, 13 Sep 2016 08:44:41 +0000 (09:44 +0100)]
Bug 17294: Make reserves_stats.pl plack safe

Lot of errors are raised by this script under plack because of var scope
issues:

Variable "$ccodes" is not available at
/home/koha/src/reports/reserves_stats.pl line 337.
Variable "$locations" is not available at
/home/koha/src/reports/reserves_stats.pl line 338.
Variable "$itemtypes" is not available at
/home/koha/src/reports/reserves_stats.pl line 339.
Variable "$Bsort1" is not available at
/home/koha/src/reports/reserves_stats.pl line 344.
Variable "$Bsort2" is not available at
/home/koha/src/reports/reserves_stats.pl line 350.
Variable "@patron_categories" is not available at
/home/koha/src/reports/reserves_stats.pl line 356.

The lazy way to fix that is that reinit them from the subroutines they
are used.

Test plan:
Execute the report, after this patch applied you won't see the error in
the log.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f66cc4dfcca243e6210c3323586efbfbd6cfe0cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1ade46e5a4928ffd8ae4080b0f0f09c0b564ed13)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17085 - Specify libmojolicious-perl min version
Mirko Tietgen [Tue, 9 Aug 2016 10:58:47 +0000 (12:58 +0200)]
Bug 17085 - Specify libmojolicious-perl min version

Set min version for libmojolicious-perl to 6.0 and regenerate debian/control

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 53f8916fe70f9401923872b7fcd05f63a1e5fdf1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3b038239a56abc645eaa4787268b71a7b6603a5a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 09:03:42 +0000 (10:03 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - Staff

Same as previous patch but for the staff interface

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d26cda6f9e7e52bb899717ffe5f84c31b46feefc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4e06090d8b0594d99da04824d239bcfa343f5e9c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17316: Do not display the list's name if the user does not have permission -...
Jonathan Druart [Tue, 20 Sep 2016 08:55:25 +0000 (09:55 +0100)]
Bug 17316: Do not display the list's name if the user does not have permission - OPAC

At the OPAC, if a user manipulate the URL to show a list (s)he is not
allowed to view, the list's name will be displayed anyway.

Test plan:
- Create a private list with user A
- Copy the op=view URL and access it with user B logged in
=> Without this patch, you will see the rss icon, the list's name and
the "add list" button
=> Without this patch, only the "unauthorized" box will be displayed

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 31ca4849efd5539c6b287047ce2da560be7e1c53)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d46322c7cd30f6be6c6589de79577b720a408d3b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in additem.pl
Jonathan Druart [Wed, 14 Sep 2016 08:20:01 +0000 (09:20 +0100)]
Bug 16800: Fix XSS in additem.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9734726846f6fa652d88c8bc39c7b43595422465)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5a4a65cdbbf2f6cabd5b0979e4c5e969eb66e0fb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - isbn
Jonathan Druart [Tue, 2 Aug 2016 15:05:09 +0000 (16:05 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - isbn

Test plan:
catalogue a bibliographic record with a isbn=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 13705e51084f605a0e9fc686e7ee30350fb556e2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - author
Jonathan Druart [Tue, 2 Aug 2016 15:03:37 +0000 (16:03 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - author

Test plan:
catalogue a bibliographic record with a author=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3169434cfa7295025e4ff5fea58f7e9730a96650)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4ab091d3bfd2c6659320cbe80d35b805cff3aa4e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16800: Fix XSS in catalogue/*detail.tt - title
Jonathan Druart [Tue, 2 Aug 2016 15:02:07 +0000 (16:02 +0100)]
Bug 16800: Fix XSS in catalogue/*detail.tt - title

Test plan:
catalogue a bibliographic record with a title=
  </title><script>alert('XSS')</script>

Go on the detail pages.
=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This of course means that any html in the title will no longer be
evaluated. :

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 515208d5ec308ade967efe04388bbedbf5f2b057)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c27216cce84fe07c962a8878be51025c9fe0aace)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoIncrement version for 3.22.11 release v3.22.11
Julian Maurice [Fri, 23 Sep 2016 06:57:52 +0000 (08:57 +0200)]
Increment version for 3.22.11 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoUpdate release notes for 3.22.11 release
Julian Maurice [Fri, 23 Sep 2016 07:14:31 +0000 (09:14 +0200)]
Update release notes for 3.22.11 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoTranslation updates for Koha 3.22.11
Julian Maurice [Fri, 23 Sep 2016 10:40:34 +0000 (12:40 +0200)]
Translation updates for Koha 3.22.11

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17121 - debian/control.in update: change maintainer for 3.22.x
Mirko Tietgen [Sat, 13 Aug 2016 11:45:34 +0000 (13:45 +0200)]
Bug 17121 - debian/control.in update: change maintainer for 3.22.x

Changing the package maintainer and removing a whitespace in
debian/control.in.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17262: Inject MEMCACHED_* variables into Plack's env
Tomas Cohen Arazi [Tue, 6 Sep 2016 19:45:36 +0000 (16:45 -0300)]
Bug 17262: Inject MEMCACHED_* variables into Plack's env

This patch adds two functions to koha-functions.sh to read the
MEMCACHED_* variables from configured instances' apache files (the only
source for that info for now).

It then tweaks koha-plack's start_plack() function so it exports the
variables to env before launching starman.

The patch seems trivial, but it highlights a bigger problem with our
Plack integration as the starman server seems to hang if those
environment variables are defined!

Sponsored-by: ByWater Solutions
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 29df6161ef24e29984d5379640faad24d0e73161)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010: Fix syntax error (RMaint followup)
Julian Maurice [Fri, 16 Sep 2016 12:07:28 +0000 (14:07 +0200)]
Bug 17010: Fix syntax error (RMaint followup)

8 years ago3.22.10 debian control fixes for debian package
Mirko Tietgen [Fri, 26 Aug 2016 08:50:18 +0000 (10:50 +0200)]
3.22.10 debian control fixes for debian package

This is what went into the 3.22.10 package, should go in 3.22.11

https://bugs.koha-community.org/show_bug.cgi?id=16788

8 years agoBug 17266 - Update man page for koha-remove with -p
Magnus Enger [Thu, 8 Sep 2016 13:10:33 +0000 (15:10 +0200)]
Bug 17266 - Update man page for koha-remove with -p

Bug 9754 added the -p|--purge-all option to koha-remove, but this
was not documented in the man page. This patch fixes that.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-remove.xml
$ man -l koha-remove.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5806c21d0ab58cf2879cb26b1fe52ba4e4c2139)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 78ab4814f040dccca2b6db7da2cab7164b49ff90)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12629 - Software error when trying to merge records from different frameworks
Kyle M Hall [Wed, 23 Jul 2014 16:43:54 +0000 (12:43 -0400)]
Bug 12629 - Software error when trying to merge records from different frameworks

Test Plan:
1) Choose a bib record that has the default framework.
2) Add a second record using that fast add framework.
3) Merge the records; switch to "Using framework: Default", and choose the original record (i.e. the one that had the default framework) as the merge reference. Clicking 'Next' will trigger the error.
4) Apply this patch
5) Repeat steps 1 - 3, no error should occur

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8fcc651a3aa9af9d1a49a6cec64fc9bde737a86)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0b4d68f0601a494c00b19d14c5af970ff04a0122)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are...
Olli-Antti Kivilahti [Thu, 19 May 2016 14:12:06 +0000 (17:12 +0300)]
Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed.

REPLICATE ISSUE:

1. Map biblio.frameworkcode to 999$b
2. Map biblio.biblionumber to 999$c
3. Add a record with something in 999$b
4. 999$b is removed by C4::Biblio::AddBiblio()

After this patch, the field used by biblio.biblionumber or biblioitems.biblioitemnumber
is not removed and created anew, thus dropping all existing additions.

There is no point in dropping the field in any case, since we can just replace
the existing subfields in-place with no need to recreate the whole field.

UNIT TESTS INCLUDED

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a9eb4005811882da0eb5e20b52861a3c85556dff)
(cherry picked from commit 26ccb6a4809154368e02e5c147414fc7a19d31be)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian...
Owen Leonard [Tue, 9 Aug 2016 16:56:46 +0000 (12:56 -0400)]
Bug 17010 [Follow-up] Canceling a hold awaiting pickup no longer alerts librarian about next hold

This patch makes a minor change to the markup to make the button in the
confirmation dialog conform to the appearance of similar buttons.

To test, follow the original test plan for this bug and verify that the
"OK" button in the dialog looks correct.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2e79c211db318969b7c9d5ff538dfd54ba1aaed2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d9006fd602a8ac472bd9ce38422d82e2b65dd7ec)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next...
Kyle M Hall [Mon, 1 Aug 2016 14:17:04 +0000 (07:17 -0700)]
Bug 17010 - Canceling a hold awaiting pickup no longer alerts librarian about next hold

In previous versions of Koha, if a hold canceled from the "Holds over" tab had other holds on it,
the librarian would be alerted with the message "This item is on hold for pick-up at your library"
and directed to check it in to fill the next hold. This no longer happens.

Test Plan:
1) Apply this patch
2) Find a hold that has been waiting too long
3) Cancel that hold via waitingreserves.pl
4) Note you get the message "This item is on hold for pick-up at your library"
5) Confirm the ok button redirects you to the correct tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b80a18ee2f059309a78087e48b9464d2352d444f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 40e667cd210b57061ca771caa38a4f6a14c22268)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17114: Fix XSS in picture-upload.pl
Jonathan Druart [Fri, 12 Aug 2016 09:42:28 +0000 (10:42 +0100)]
Bug 17114: Fix XSS in picture-upload.pl

To reproduce:
1/ cp your_image.jpg 'test<svg onload=alert(1)>.jpg'
2/ Use the upload picture tool to upload this file
=> Without this patch, the alert is show
=> With this patch, the filename is correctly displayed and no alert

Note that the cardnumber var was not escaped neither, it's now.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit da03dbd458c59da0b9213efacd3425e89b453332)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0fba9c17c9154379430119646c3571f09d986948)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>