Commit Graph

24349 Commits

Author SHA1 Message Date
Chris Cormack a2bbfa68b6 Bumping version number for release 2016-06-23 10:07:51 +12:00
Chris Cormack 3845510ecc Translation updates for 3.20.12 2016-06-23 09:51:48 +12:00
Chris Cormack 354b92a306 Koha release 3.20.11
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJXIOlRAAoJEGOGo5WRV8bu28oH/0PKE3ZtnLcMFJpXOImS+VdM
 JJFYqQmwSgUK2ixeSjvhUid9Q0vOuYZeIXvBn3WPTnwutrP5pJH9ncRpnmev/ACI
 1k30vtQsndYICce1dbKLBI4SmtR6xcLmzEtXkHuS4h271bAxRufDvIWclh77yIRB
 8B1KMpEE9Pj+cVi4y/jRYs2FwRiB22dO2xFKuDjnFGFJv+kRTKKN2LPUTaCBa/9O
 bweUccX9upSIWje+4oI1xlVrrtSOjId6HaRx414zpdcqYXQkWeKFiscvwyyIO/E+
 RmQFVJnSLpfEBvXoEZvd7nYVUcUoAK9kaFnaFMUTdsHCQeZh2s89zz78iArI1sI=
 =LWWF
 -----END PGP SIGNATURE-----

Merge tag 'v3.20.11' into fix_3.20.x

Koha release 3.20.11
2016-06-23 09:08:06 +12:00
Chris Cormack 592653f067 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>
(cherry picked from commit 8d6486013b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-22 08:51:22 +12:00
Jonathan Druart 4f25396332 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>
(cherry picked from commit dd94d1bc4c)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-22 08:47:24 +12:00
Jonathan Druart 76844ae98a 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>
(cherry picked from commit 858e3b2043)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-22 08:43:49 +12:00
Chris Cormack 476f55d6b9 Bug 16220 : Updated minified css 2016-06-21 11:06:19 +12:00
Owen Leonard dde8bd82ac Bug 16220 - The view tabs on opac-detail.pl are not responsive
When looking at the detail page for a bibliographic record, there are
tabs linking to the "Normal," "MARC," and "ISBD" views. These tabs need
to be styled responsively so that they work well at all browser widths.

This patch makes some slight markup changes to the templates and updates
the LESS files to add responsive styling.

This patch does not include the compiled CSS file, so the follow-up is
required to test the visual changes.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0fcbf1efe1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c760866e23)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-21 11:01:48 +12:00
Owen Leonard 3384d27b76 Bug 16159 - guarantor section missing ID on patron add form
In the patron entry form template most <fieldset> and <legend> tags have
unique ids. This patch adds ids to fieldsets and legends which lack
them.

To test apply the patch and view the patron entry form. There should be
no visual changes. There should be no HTML validation errors triggered
by this change.

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 553d06073b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit eba902ced5)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-21 08:55:12 +12:00
Jonathan Druart 5221b2c5b3 Bug 16407: Simplify comments
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 671f81e877)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4b0c368461)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-21 08:50:56 +12:00
Marcel de Rooy 3dc7a80efe Bug 16407: Fix Koha_borrower_modifications.t
This test was using hardcoded borrower number, assuming they should be
present. Now we use TestBuilder.

Test plan:
Run the test.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass before and after 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 d8d4277471)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 9112e88901)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-21 08:50:33 +12:00
Julian Maurice abe50ed007 Bug 16709: Followup of bug 11038 for 3.20.x only
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Good catch, bad bug

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove space and apply same order than in master (CSS then
JS)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-21 08:28:30 +12:00
Chris Cormack d1def8b2cd Fixing number of tests in t/db_dependent/Members.t 2016-06-21 08:23:05 +12:00
Owen Leonard a28a718084 Bug 16315 - OPAC Shelfbrowser doesn't display the full title
This patch adds subtitle information to the display of titles in the
OPAC's shelf browser.

To test, apply the patch and make sure OPACShelfBrowser is enabled.

- View the detail page for any title in the OPAC which has items.
- Click the "Browse shelf" link next to any item in the holdings table.
- The titles in the shelf browser should display with all subtitle
  information as defined in Keywords to MARC mapping.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Adding 245a and c as 'subtitle' in Keywords to Marc make them
show on shelf browser.
No errors.

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 67f91f24e5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b47e87d082)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 11:12:45 +12:00
Nick Clemens ee3caa9163 Bug 15682 - Only allow merging of 2 or more records form lsits (for consistency)
Test as above but on shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 9550e37fc6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 9f1e23735f)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:37:08 +12:00
Nick Clemens fc387f2fba Bug 15682 - Merging records from cataloguing search only allows to merge 2 records
To test:
1 - Perform a cataloging search
2 - Attempt to merge 0 results - should fail
3 - Attempt to merge 1 resutls - should fail
4 - Attempt to merge 2 results - should succeed
5 - Attempt to merge 3 results - should succeed
6 - Test any other amount of records and if more than 1 it should
succeed

**Note: On shelves.pl you can merge a single record.  I think that is
incorrect so made this only work for 2. Will add a followup to fix
shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 8f1e5ad95f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit aa8b468a13)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:35:30 +12:00
Owen Leonard 2074bb56f1 Bug 15194 - Drop-down menu 'Actions' has problem in 'Saved reports' page with language bottom bar
This patch changes the direction of the "actions" menu on the saved
reports page so that it popup up instead of down.

To test, apply the patch and go to Reports -> Saved reports.

- Click the "Actions" menu for any report and confirm that the menu
  displays above the button instead of below it.

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit de98a93675)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 1e494ae15e)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:15:16 +12:00
Jonathan Druart 6ede349cdb Bug 14632: Add Copyright for the Koha Dev Team
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 68dbe8415f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ac49b0fc70)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:07:47 +12:00
Mark Tompsett 4c726cbd1c Bug 14362: Regression tests
This should trigger the error. Attempts to shift system time
zones did not make sense as to the number of failures.

Added Time::Fake dependency, if it isn't installed these extra
tests don't run. There is a nice skip message about it.

Added License text.

TEST PLAN
---------
 1) apply test patch
 2) sudo dpkg-reconfigure tzdata
    -- set your system time to GMT (Africa/Abidjan)
 3) prove t/Circulation/AgeRestrictionMarkers.t
    -- should not fail, even if you change system
       time to any time.
 4) sudo dpkg-reconfigure tzdata
    -- set your timezone to Eastern
 5) sudo date -s"2015-06-18 21:15:00"
 6) date
    -- should be past 9pm Eastern timezone
 7) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
 8) sudo date -s"2015-06-18 12:00:00"
 9) date
    -- should be noon Eastern timezone
10) prove t/Circulation/AgeRestrictionMarkers.t
    -- success?! Time sensitive tests are bad tests.
11) sudo apt-get install libtime-fake-perl
12) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
    -- changing timezone to anything other than GMT
       should trigger a kaboom.
13) apply fix patch
14) prove t/Circulation/AgeRestrictionMarkers.t
    -- should work all the time.
15) less t/Circulation/AgeRestrictionMarkers.t
    -- the license text should be similar to
       http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
16) koha qa test tools.

Signed-off-by: Nick Clemens <nick@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 a2aba3c86f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Conflicts:
	C4/Installer/PerlDependencies.pm

(cherry picked from commit 975f7bb9aa)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:07:23 +12:00
Mark Tompsett d608042be4 Bug 14362: PEGI15 Circulation/AgeRestrictionMarkers test fails
It is best to test when UTC date is a date in the future compared
to your timezone. I'm in Eastern, so right now, I expect this
test to fail for another 2.5 hours.

TEST PLAN
---------
1) prove t/Circulation/AgeRestrictionMarkers.t
   -- fails for PEGI 15 after 9pm.
2) Apply patch
3) prove t/Circulation/AgeRestrictionMarkers.t
   -- works.
4) koha qa test tools

Signed-off-by: Nick Clemens <nick@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 73f55165be)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c894bd4ab5)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 10:06:47 +12:00
Alex Arnaud 0eae19928b Bug 13877 - Fix QA issues
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b84aa1779e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 3cbbf6b8ed)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:51:39 +12:00
Alex Arnaud 7a3c801306 Bug 13877 - Make serialseq season name translatable regardless its position in a string
Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit adb8d41053)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e0f8aff8a9)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:51:20 +12:00
Julian Maurice b46284feb2 Bug 13041: Fix add of basket's manager when name contains a single quote
If you are trying to add a user as a manager of a basket in
acquisitions, a JavaScript error will be triggered if that user has a
single quote in their name (e.g. "O'Neil"). This patch corrects the
issue.

Also changed by this patch: Increased the size of the patron search
popup and made a correction to some invalid HTML.

To test you should have a patron whose name contains a single quote who
is also a user with permission to manage acquisitions.

- Apply the patch and go to Acquisitions.
- Locate an open basket and view the details for that basket.
- In the "Managed by" section, click the "Add user" button to trigger
  the patron search popup.
  - Search for the patron described above and click the "Add" button.
  - In the parent window, the patron you chose should have been added to
    the "Managed by" section.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 964a188813)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:27:02 +12:00
Marc Véron 48f1119a54 Bug 12721: (followup) Replace mysqlism by DBIx::Class
This patch removes the mysqlism (see comment #18)

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed QA tools complaints about missing lines before
and after =cut in POD.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ef97b6b301)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8fb9837ade)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:23:22 +12:00
Marc Véron cd9170d249 Bug 12721 - Prevent software error if incorrect fieldnames given in sypref StatisticsFields
To reproduce issue:
See comment #1

To test:
- Apply patch
- Leave syspref StatisticsFields empty
- Display statistics for an author

  => Result: Table displays Shelving location, Collection code, Item type
           (as before)

- Change syspref to any combination of location|itype|ccode
  => Result: Table displays columns as appropriate

- Change syspref to some garbage
  => Result: Same as with empty syspref (was crashing without patch)

- Change syspref to valid combination with trailing |
  => Result: Table displays columns as appropriate (was crashing
     without patch)

- Change syspref to a combination of valid and invalid fields
  (location|blah|ccode)
  => Result: Table displays column of valid fields only (was crashing
     without patch)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5fc93bce9b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 36392d8a0c)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:22:56 +12:00
Marc Véron f49adba138 Bug 12721 - Syspref StatisticsFields: Warning on About page and text change in System preferences
This patch adds a warning to the about page if the syspref 'StatisticsFields' is misconfigured.
Additionally, the text on Home > Administration > SystemPreferences for 'Statistics Fields'
is changed.

To test:
- Apply patch
- Edit syspref 'StatisticsFields'. Verify that the explanation makes sense.
- Leave field empty
  => verify that no message appears on About page, tab System information
- Insert valid field names, e.g. location|itype
  => verify that no message appears on the About page
- Add trailing char
  => verify that the warning message appears on the About page
- Fill in some garbage or misspell a field name
  => verify that the warning message appears on the About page

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 95f492b4d2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit f6694ce92f)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 09:22:24 +12:00
Jonathan Druart 9aea6d98ab Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons
Bug 15840 tried to fix a bug but makes things more complicated than it
was before.
If an userid is not provided for 1 or more rows of the csv file, it
should not be updated. However, if a userid is provided and it already
used by an other patron, the import should fail for this row (but not
crash!).

Test plan:
0/ Create a patron with a userid=your_userid
1/ Use the import patron tool to update this userid
=> userid should have been updated
2/ Update another data and do not provide the userid
=> data should have been updated and not the userid
3/ Update another data and provide the userid, but set it to an empty
string, or '0'
=> data should have been updated and not the userid
4/ Update another patron, and set userid=your_userid
=> Update should fail and an error whouls be displayed ("already used by
another patron")

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7b76b24fad)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b53075b58d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 08:55:37 +12:00
Jonathan Druart c7a9da2117 Bug 16426: Add tests for ModMember - do not update userid
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e883c19f37)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ea45e3f39e)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 08:55:05 +12:00
Jonathan Druart af63ab0687 Bug 12752: FIX letter names in 3.15.00.041
3.15.00.041 was wrong, the name of the letter should not always been the
name of the first HOLD notice.
PREDUE_PHONE should be updated with the first name of the PREDUE notice,
same for OVERDUE_PHONE and OVERDUE

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6d52cd63f3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6ca552c2e8)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2016-06-20 08:46:47 +12:00
Frédéric Demians 66a7d1aec6 Translation for 3.20.11 2016-04-27 17:49:52 +02:00
Frédéric Demians e727480891 Version 3.20.11 2016-04-27 17:31:42 +02:00
Jonathan Druart a33d75c5b6 Bug 15930: Make patron searches defaulting on 'contain'
The default patron search types has changed from 'contain' to
start_with. Users consider it as a bug.
This patch revert the previous changes to default on 'contain'.

Test plan:
Search for patrons in different places (guarantor, checkout, patron
module, acquisition module, etc.) and confirm that the default is always
'contain'

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit a8491dc156)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit f2c5b7b036)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:21:18 +02:00
Mason James d1f8301ff8 Bug 1750 - Report bor_issues_top erroneous and truncated results.
Signed-off-by: Mason James <mtj@kohaaloha.com>

TEST PLAN
---------
1) Ensure you have some checkouts
2) Home -> Reports
        -> Patrons with the most checkouts
3) Click 'Submit'
   -- you get a list
4) Click a patron name.
5) Note the borrower number.
6) In MySQL run something like:
   > UPDATE borrower SET firstname=NULL WHERE borrowernumber=####
7) Refresh the report page
   -- name goes totally blank
8) apply patch
9) Refresh the report page
   -- only first name is lost
10) run koha qa test tools

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit b859739c2a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8f4df78bd4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:10:55 +02:00
Jonathan Druart 0bceb0af81 Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places
The login page should not be displayed if the page is displayed in a
frame.

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 6efa491d1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7729ace7fa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:10:25 +02:00
Jonathan Druart 62b3d204b2 Bug 16210: Revert OPAC changes from Bug 15111
This patch reverts the changes made at the OPAC from the following
patches:

Do not include the antiClickjack legacy browser trick for greybox"

Revert "Bug 15111: Do not include the antiClickjack legacy browser trick for greybox"
This reverts commit fc640d2a86.

Revert "Bug 15111: Change X-Frame-Options with SAMEORIGIN"
This reverts commit fb167c0e4b.

Revert "Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks"
This reverts commit dc03bca76c.

Setting X-Frame-Options to SAMEORIGIN is enough for mordern browsers:
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

The antiClickjack trick should be removed at the OPAC as we want to keep
the OPAC usable even if the user has disabled JS.
That means the OPAC will be vulnerable to XFS if a user is navigating
with a prehistoric browser:
Firefox 3.6.9 September 2010
IE 8    March 2008
Opera 10.5  March 2010
Safari 4  February 2009
Chrome 4.1.…  somewhen 2010

Test plan:
Confirm that there are no regression of bug 15111 with modern browsers

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit d496d03e8a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 57fc49475d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:09:16 +02:00
Jonathan Druart 4a47224136 Bug 15111: Do not include the antiClickjack legacy browser trick for greybox
Most of the scripts called via greybox (which uses iframe) don't include
doc-head-close. But some do.
This patch adds a popup parameter for these templates, not to include
the legacy browser trick and avoid the replacement of the location.

Test plan:
1/ Export patroncard and label
2/ translate itemtypes
3/ click on a idref link at the OPAC

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc640d2a86)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 45e3988243)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:07:58 +02:00
Jonathan Druart 68f551c37a Bug 15111: Change X-Frame-Options with SAMEORIGIN
There are some places where frames are used, the greybox JS plugin for
instance.

We need either to allow them from Koha or replace this plugin.
The easier for now is to switch the value from DENY with SAMEORIGIN.

Test plan:
- modify a record in a batch (tools/batch_record_modification.pl)
- click on preview marc
=> With only the previous patch you will get a blank page.
=> With this patch apply, it will work as expected.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fb167c0e4b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 201e1f2397)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:04:32 +02:00
Kyle M Hall c5a4a4ad64 Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks
Web pages that can be embedded in frames are vulnerable to cross-frame
scripting attacks. Cross-frame scripting is a type of phishing attack
that involves instructions to an unsuspecting user to follow a specific
link to update confidential information in an online application.
Because the link leads to a legitimate page from the online application
that is embedded in a frame hosted by the attackers' server, the
attackers can capture all the information that the user enters.

https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dc03bca76c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c97a01e133)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:04:08 +02:00
Jonathan Druart 029ccc0d51 Bug 16179: Do not crash if "rate me" is clicked and not rate selected
If JS is disabled and a user clicks on the "Rate me" button, Koha will
crashes with:
DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null
at /usr/share/koha/lib/C4/Ratings.pm line 208

To avoid that, opac-ratings.pl will check if a rate has been selected.

Test plan:
Disable JS
On a record detail page, click on the "Rate me" button

TESTED PLAN:
1) go to /cgi-bin/koha/opac-ratings.pl?biblionumber=1
   -- kaboom as above.
2) apply patch
3) refresh
   -- either login screen (don't know why)
   -- or if already logged in, detail page.
4) koha qa test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I tested successfully by temporarily removing the modification made by
Bug 16210.

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit b679cac964)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit a965702c08)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:02:34 +02:00
Jonathan Druart 49e43878ef Bug 15832: Remove empty string from the filters
On each cell, the split will generate a new empty entry.
This patch removes that entry.

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 1931ff4653)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ef6c60d8cc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:00:33 +02:00
Alex Arnaud 551effddfb Bug 15832 - Fix filter and items split-up in pendingreserves.tt
Test plan:

- Go to circ/pendingreserves.pl (Ensure that there are biblios with many
  items on different branches),
- Check the libraries filter at the bottom of datatable. There should be
  duplicates.
- Apply this patch and return to circ/pendingreserves.pl,
- check that libraries filter should not contain duplicate,
- check that the filter works.

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

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 82be93af1c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4f699275a7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 17:00:18 +02:00
Tomas Cohen Arazi fa07817592 Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip if enabled
This patch changes the behaviour of the koha-rebuild-zebra script in the following way:

USE_INDEXER_DAEMON=no
- Keeps the current behaviour

USE_INDEXER_DAEMON=yes
- It skips incremental indexing to avoid races.

Caveats:
- A --force option is introduced for useing in a specific situtation that might need it
 (i.e. the administrator knows what he's doing).
- If --full is passed, the reindexing is not skipped.

The documentation files and messages are adjusted accordingly.

This patch should help users that want to use the indexing daemon, in which case they wouldn't need
to change their default 5 min cronjob (it will be just skipped). Ultimately, koha-common could have
USE_INDEXER_DAEMON = yes by default, but that's subject for another bug report.

To test:
- Play with the different option switches and USE_INDEXER_DAEMON
- Things work as expected
- Sign off

Regards

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

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

Signed-off-by: Your Full Name <your_email>
(cherry picked from commit 997ad166c6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 67dd96545b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:57:53 +02:00
Julian Maurice 06b7d7fa19 Bug 14816: Fix multiple selection in item search
Send each selected value as a separate parameter. Otherwise DataTables
(or jQuery ?) joins all values with a comma

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

I could not reproduce the bug when selecting multiple home libraries,
but I could by selecting multiple item types or collection codes. The
patch allowed those queries to complete correctly.

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 9aa8bf46f6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 47ebb4ffb1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:56:44 +02:00
Nick Clemens 3c76bf5a76 Bug 15928 - Show unlinked guarantor
To test:
1 - Add guarantor data to patron account by typing it in but do not 'Set to patron'
2 - Note it is not displayed on patron details
3 - Apply patch
4 - Note the info is displayed
5 - Test that linked guarantors show as expected

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit bebb61739f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:53:26 +02:00
Julian Maurice d3faa9cc53 Bug 15962: Block the currency deletion if used
A currency should not be deleted if used by a vendor or a basket.

Test plan:
1/ Add a new currency
2/ Create a vendor using this currency
3/ Create a basket using this currency
4/ Try to delete the currency
5/ Delete the basket
6/ Try to delete the currency
7/ Delete the vendor
8/ Delete the currency

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c20496aea9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:52:44 +02:00
Marc Véron 2f59171ca9 Bug 16133: Translatability of database administrator account warning
This patch removes sentence splitting of the database administrator warning with
a button styled link.

Additionally, it uses the same wording as in the warning on the 'About' page.

To test:

- Apply patch
- Log in to Staff client as database administration user
- Verify that the wording of the warning is the same as on the About page (Tab
  'System information')
- Verify that the link to the patron administration page is styled as a button
  and behaves correctly

NOTE: Actually, the category is irrelevant. But I like the improved message.
      Categories may or may not be set up at the initial log in.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e53b80dedf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c6a049167f)
2016-04-27 16:42:59 +02:00
Mark Tompsett 52f8818ac3 Bug 16191: t/Ris.t is noisy
TEST PLAN
---------
1) prove t/Ris.t
   -- very noisy
2) apply patch
3) prove t/Ris.t
   -- just one confusing noise.
4) run koha qa test tools

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 5b909a8269)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit af42fd5e81)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:41:40 +02:00
Owen Leonard 7eb3fc2738 Bug 16047 [Follow-up] Software error on deleting a group with no category code
This follow-up take the original patch a little further, making category
name required on the entry form as well. Without a category name there
is no label in the interface when selecting a category. That doens't
make any sense.

Also changed on the group entry form:

- Added "required" attribute to labels on required fields.
- Changed "Update" submit button label to "Submit."
- Added a "Cancel" link.
- Added the "validated" class to the form so that our built-in
  validation script will process it (not strictly necessary but makes
  the validation appearance more consistent).

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit df127ebad8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c514e1fee2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:41:07 +02:00
Aleisha 67acc63bd1 Bug 16047: Making category code a required field on creating a group
This will prevent users from creating a group without a category code,
which causes a software error when you try to delete it

To test:
1) Go to Admin -> Libraries and groups
2) Create new group without category code
3) Attempt to delete the group you just created and notice software
   error
4) Apply patch
5) Create new group without category code
6) Notice you now cannot save the group without putting in a category
  code

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 577aa86eb9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 730cfb5925)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:40:40 +02:00
Aleisha 37740c696e Bug 16029: Hide patron toolbar if patron does not exist
To test:
1) Create a patron, take note of the borrower number
2) Delete the patron
3) Navigate to the page of the patron you just deleted by typing the url (ie /cgi-bin/koha/members/moremember.pl?borrowernumber=X)
4) Confirm that the patron toolbar is not showing on the page
5) The message now has a link that says 'Find another patron?'. Click this link and confirm you are taken to the member home pgae.

Sponsored-by: Catalyst IT

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: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 1870141874)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e0ad205512)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-04-27 16:39:59 +02:00