Commit Graph

24181 Commits

Author SHA1 Message Date
Aleisha be643167c9 Bug 11569: Correcting typos in userpermissions.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cc592b4b38)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8635b7b6dc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-20 08:09:07 +01:00
Kyle M Hall 0dc55b829b Bug 15687 [QA Followup] - Tidy sub to remove tab characters
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6d24219976)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit f9978afb60)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-18 19:40:08 +01:00
Julian Maurice eca6afb662 Bug 15687: Fix xgettext.pl syntax 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 70112cfb81)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit af24e8ee01)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-18 19:39:51 +01:00
Frédéric Demians 23716ebcc3 Bug 15760 RMaint Avoid SQL injections
For security purpose, backport a fix to the way the DB connection is
established.
2016-02-12 12:23:22 +01:00
Kyle M Hall 9ac267821e Bug 15298 [QA Followup] - Fix whitespace issues
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f98225c7c2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit be7ca57e11)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:16:57 +01:00
Chloe 9f190804f6 Bug 15298 - z39.50 admin setup, options column suggested changes
To Test-
1-first look at the orginal Z39.50/SRU servers administration page
  (/cgi-bin/koha/admin/z3950servers.pl?op=delete_confirmed&id=6)
2-apply patch
3-now see the new styling of the "action" drop down tab like the one on
  the saved reports page
4-check that each link works (for delete i reccommend copying one then
  deleting the copy)

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 142c47fcf4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 76326a0981)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:16:33 +01:00
Marc Véron e68c779953 Bug 15472: Do not display links to circulation.pl if remaining_permissions is not set
If permission 'circulate_remaining_permissions' is not set, links to 'Circulation'
(/circ/circulation-home.pl) on the intranet home page lead to an error
message: "Error: You do not have permission to access this page."

This patch hides the links if the permission is not set.

To test:
- Apply patch
- Log in to the intranet (staff client) with a patron who has the permission
  'circulate_remaining_pernissions' not set
- Verify that no links to Circulation appear on the intranet start page
  (menu top left and menu in main page area)
- Log in as a user who has the permission set.
- Verify that te links appear as appropriate.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 83936a6b82)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit daaf3c758c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:15:38 +01:00
Hector Castro d3324e3f25 Bug 15598: Also fixing space near exclamation mark in other files
To test:
-Check that the space near to exclamation mark (!) is fixed

Signed-off-by: Briana <brianagreally@gmail.com>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d3b7ccc87e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7db70b33a4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:14:02 +01:00
Hector Castro 67d6b2fb22 Bug 15597: Typo in opac-auth-detail.tt
Patch fix a small type

To test:
- Verify that a double punctuation mark colon (:) is fix it.

Signed-off-by: Briana <brianagreally@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 386aafd8bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6cb7dc0c0a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:12:38 +01:00
Aleisha 9fba5a9f0c Bug 15589: Changing 'his' to 'their' in OPAC lists
To be more gender neutral

To test:
1) Go to OPAC lists (opac-shelves.pl)
2) Confirm it now says "Allow anyone to remove their own contributed
   entries."

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 229cc7e8be)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d26086a84c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:11:16 +01:00
Kyle M Hall 38dc5c75c4 Bug 15375 [QA Followup] - Fix non-functional restriction message and date
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 4369486767)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit db2a954579)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:10:58 +01:00
Kyle M Hall 70f5762fb6 Bug 15375 [QA Followup] - Remove refereces to biblio and biblionumber for patron messages
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a633af13b6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 73bf2f2dc8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:10:47 +01:00
Marc Véron b5cca12611 Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold'
Fix several issues with odd translations on opac-reserve.tt due to
string splitting by tags.
In addition, streamline messages to make them similar to the same
messages on the OPAC summary page (Bug 15374)

To test:
- Apply patch
- Log in to OPAC
  - with blocked /debarred user (with and without comment and date)
  - with user who has to much fines
  - with user who has his card marked as lost
  - with user with expired account
  - with user with uncertain address information
- Try to put holds
- Verify that message about why holds are not possible is correct
  and displays nicely and that links in messages work
- Carefully examine code
- Search for regressions

(Amended: stray i removed, test plan updated, removed account that
          is about to expire)

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

I am going to sign off on this because it works as it should and I think the problems I had in comment 8 are a separate bug.

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f0face3869)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit dceb3ed022)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:10:23 +01:00
Hector Castro fffe15f795 Bug 15190: Bad utf8 decode to unapi and fixing status code 200
Fix bad utf8 decoding, also fix status code 200 for no parameters passed to
script

To reproduce the issue in OPAC
1) Copy from LOC (Z39.50) ISBN 8467020113 or test it with whichever record with
   special characters
2) Open URL in OPAC cgi-bin/koha/unapi?id=koha:biblionumber:4&format=oai_dc
   play with oai_dc, srw_dc, mods, mods-full, mods3, mods3-full, rdfdc.
   Note: marcxml does not fail
3) Enter the new biblionumber for ISBN 8467020113 or the record of your choise
4) An oai_dc record will display, notice about the bad utf8
   decoding characters
5) Search the record in OPAC
6) To reproduce code 200 Ok and 300 Multiple choices play with:
    cgi-bin/koha/unapi
    cgi-bin/koha/unapi?id=koha:biblionumber:4
7) If possible test in NORMARC (UNIMARC will launch an error because bug 15162)

Test plan
-Apply patch
-Follow steps 2 to 6
-You will see no errors in utf8

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 283d80729a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4f976932a4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:09:55 +01:00
Gus 856a2bd1a1 Bug 15624: Spelling mistake in suggestion.pl
Test - due to noone being in a comparison name it was not changed
1. search for choosen, see that it was removed
2. search for agregate, see that it was removed

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typos fixed

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9c2b0ea115)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ac36fe478a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:09:16 +01:00
Gus 600b83a136 15623 - Spelling mistake in boraccount.pl Test - Search for writen, if not found fix is correct
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Gus: You should try git grep writen one more time :)

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17a2426e0f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d5dd89ff78)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:09:02 +01:00
Gus 6a03a32898 Bug 15621: Spelling mistake in printinvice.pl
Test- search for writen, if not found patch successful

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typo fixed

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 12bd1dc601)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e23abce8dd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:08:47 +01:00
Gus 2b19f959ce Bug 15619: Spelling mistake in memberentry.pl
Test - Check file for 'konw', notice no instance

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typo fixed

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 89978bab10)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 45095c0078)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:08:20 +01:00
Chloe 5f51b6f970 Bug 15614 - Spelling mistake in circ/pendingreserves.tt: Fullfilled
To Test:

Check if "fullfilled" has been changed to "fulfilled" in line 137

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 69b5fc9aa1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 644e69cb7f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:40 +01:00
Jonathan Druart 231f6d9ebe Bug 15613: Fix 2 other occurrences of paramter vs parameter
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6c80367f85)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8013976d3e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:25 +01:00
Gus 03efedc3e9 Bug 15613 - Spelling mistake in opac-shelves.tt
Spelling mistake in opac-shelves.tt paramter ==> parameter

To test - check the change is made in the file

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9a109fde4c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 314f1f7a2f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:06 +01:00
Jonathan Druart 4c8945df23 Bug 15611: Fix another implimented vs implemented
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 2723e463c0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6c1b8ddffe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:06:40 +01:00
Chloe c0d4938a76 Bug 15611 - Spelling mistake in patroncards/edit-layout.tt
To Test:

check that "implimented" has been changed to "implemented" on both lines
478 and 534

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 88607dfaf1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 74680de736)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:06:10 +01:00
Aleisha edf5844893 Bug 14641: [SIGNED-OFF] Warns in subscription-add.pl
Removes warn using Jonathan's suggestion!

To test:
1) Reproduce warns by clicking New Subscription
2) Apply patch
3) Click New Subscription again
4) Confirm warns are gone

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Patch removes the warn that come when clicking "New subscription"

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fe79402575)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 0e6346c614)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:54 +01:00
Aleisha 88d4d49b11 Bug 14480: Silences warn from editing patron
Argument "" isn't numeric in numeric lt (<)

TEST PLAN
---------
1) Go to any patron in staff client
2) Click 'Edit'
3) Check error logs
   -- warnings should exist.
4) Apply patch
5) Reload page
   -- warnings should not be triggered.
6) Add restriction and save
7) Go back to edit screen
   -- restriction should be shown
8) Remove restriction and save
9) Go back to edit screen
   -- Should say "Patron is currently unrestricted"
10) Run koha qa test tools.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 11109501eb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c08a13593c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:31 +01:00
Marcel de Rooy 258cb5aaef Bug 15553: [QA Follow-up] Replace hardcoded tmp and add instance to dirname
If you use multiple instances on one server, you could have the situation
that instance A creates the cgisess subfolder and instance B could have a
permission problem. This patch resolves that by allowing each instance to
have its own cgisess subfolder.

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c4934b2dab)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d259eaac7b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:05 +01:00
Blou 5a0dc0c2a4 Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory
When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp',
which store the session info in the /tmp directory instead of the database.

Depending on the frequency of the cleaning process (or lack thereof),
this can be heavy pollution into the /tmp directory, making it unusable.
"rm cgi*" would not even work since cgi* extends to over 8000 items...

A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess.

Testing scenario:
1) change the syspref SessionStorage to 'tmp'
2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created
3) Apply the patch
4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Session files are created in /tmp/cgisess/ instead
of directly in /tmp. I usually store sessions in memcached, but a
couple of times memcached has died on me, and before I knew it, /tmp
was so full of sessions files, I could not easily delete them with
"rm /tmp/cgisess*". Being able to delete /tmp/cgisess/ should be a
bit easier.

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 3815915a33)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6efb2ebc0f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:04:30 +01:00
Chloe 66e9870a3e Bug 15468 - Search links on callnumbers with parentheses fails on OPAC results page
To Test:
1-before plugin search in opac for a call number with either a "(" or a ")" in it
2-it should come back with no results
3-use plugin
4-re-search the call number with "(" or ")"
5-the search should come back with results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
It seems this only works with OPAC XSLT for results page turned off
and OPACItemsResultsDisplay turned on. - Then the callnumbers
in the result list will be linked for searching.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6d9a75014e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 27f9eb0119)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:03:55 +01:00
Chloe 4ccc345110 Bug 15592 - spelling mistake in ~/Koha/koha-tmpl/intranet-tmpl/p./plugins/plugins-upload.tt
To Test:

checkthat "extention" has been changed to "extension" on line 27

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 70086f1681)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 841aa118e5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:03:30 +01:00
Winona Salesky 31a50f6eb7 Bug 15444 - MARC21: Repeated 508 not correctly formatted (missing separator)
This patch adds a separator for multiple 508 fields to the XSLT display
in the staff and OPAC detail view.  Separator is wrapped in span with
class=‘separator’ for easy manipulation via css.

To test:
* Search the OPAC
* Click the title with multiple 508 fields
* Make sure the fields display properly
* Repeat for a few more titles
* Repeat in the Staff Client

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 1c5f75fde5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c68d58259e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:02:55 +01:00
Marc Véron a51ef6e248 Bug 15476: Listname not always displayed in shelves.pl
To reproduce:
  - In staff client, go to List and click on the name of an
    existing list.
  - At the bottom of the screen, you see a title "Add an item to "
    but no list name.

To test:
  - Apply patch
  - Verify that listname appears after "Add an item to "

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Label/legend for listname displayed Ok

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit df13a5d3e7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 67c26ef476)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:01:45 +01:00
Natasha 85df138772 Bug 14624 - <<items.content>> for advance_notices.pl wrongly documented
To Test Check perldoc for misc/cronjobs/advance_noitces.pl
and see that the documentation matches.

Ran:
$ perldoc misc/cronjobs/advance_noitces.pl
Saw expected changes.
Koha QA test tools pass too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switched due date for the name of the database column
date_due as the parameter expects a list of database
column names.

(cherry picked from commit 4120e48b0f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b3586e5dc7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:59:37 +01:00
Chloe 14d59c8869 Bug 15609 - spelling mistake in :692: writen ==> written
To test:

Check that "writen" has been changed to "written" on line 692

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f37ce198fe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 87e96810fc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:59:10 +01:00
Jonathan Druart 44a331a2b4 Bug 15299: Ask for confirmation when deleting a report from second page
Some link are hidden when loading the page, by DataTables, we need to
use the delegate jQuery method to attach a handler to the click event
for all delete links (the ones existing when loading the page, and the
ones displayed in the future).

Test plan:
Have more than 20 reports defined
Go on the report list view, then change the number of elements
displayed, click "action>delete". You should get a warn.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Confirm that there is now a confirmation on delete from the list -> action menu

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit dcce65c8fd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

(cherry picked from commit dfdf3c15de)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:58:30 +01:00
Briana cacbfbf834 Bug 14810 Improve messages in patron anonymizing tool
To test:
Create circulation records
Go to 'http://localhost:8081/cgi-bin/koha/tools/cleanborrowers.pl'
Anonymize patron checkout history
Message should read 'All checkouts older than [date] have been
 anonymized
When patch is not applied, message reads 'All patrons with checkouts
 older than [date]  have been anonymized"

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e38564d213)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 2f3843af99)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:57:58 +01:00
Martin Stenberg 8e554c8581 Bug 14555: Warns in opac-search.pl
Avoid use of uninitialized value in split

== Test plan ==
1. Go to opac advanced search
2. Click "Search" without any search query
3. Log file will show "Use of uninitialized value in split at ..."
4. Apply this patch
5. Repeat step 1 and 2
6. Log file should no longer show "Use of uninitialized value in split at ..."

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
At step 2 you have to check a criteria

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ab81a0feee)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 34f20412f8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:57:17 +01:00
Jonathan Druart fa83ce9b6e Bug 12636: Do not display unique patron attributes in the batch patron modification
Batch patron modification should not offer to update patron attributes
with values which are designated as unique since such attributes are
required to be unique to a single patron.

Test plan:
Create some patron attributes, some should be unique.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as unique won't be
display anymore.

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 b7b94b7012)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4c0506f33e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:56:55 +01:00
Jonathan Druart e56a39f657 Bug 14133: Print notices should be generated with the print template
If the overdue notice to send is an email or a SMS and the patron does
not provided such information, a print notice is generated.
But it will be generated with the email or sms template, which is not
useful, especially in the SMS case.

The template to use should be the print one.

Test plan:
0/ Does not apply this patch and Correctly define the overdue rules to generate
an overdue notice to the message_queue table.
Check email + SMS
1/ Define an email address and a SMS number for a patron
2/ Generate the overdue notices (misc/cronjobs/overdue_notices.pl [-t])
3/ 2 notices should have been generated:
    mtt=email with the email template used
    mtt=sms   with the sms template used
4/ Truncate the message_queue table
5/ Remove the email address and repeat 2
6/ Only 1 notice should have been generated:
    mtt=print with the email template used
7/ Truncate the message_queue table
8/ Remove the sms alert number and repeat 2
9/ 2 notices should have been generated:
    mtt=print with the email template used (or sms I suppose)

10/ Apply this patch and repeat previous steps.
The print notices should be generated with the print template.

IMPORTANT NOTE: This test plan does not take into account the notices
generated for the staff ("These messages were not sent directly to the
patrons."). However the behavior will also change, the print template
will be used in all cases. Is it what we want?

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

Seems fine by me

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 581759e985)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d55a5ca464)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:55:43 +01:00
Aleisha 822cb51586 Bug 15577: Correcting link redirect
To test:
1) Add a restriction to a user
2) Log in as that user in the OPAC
3) Click 'your account page' link in the yellow mesage
4) Confirm you are taken to opac-account.pl

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5b6457087d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7cfa560631)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:51:49 +01:00
Jonathan Druart 05ef470ecb Bug 15357: Display existing holds even if no items exist
If all the items have been deleted for a record and holds exist, the
holds are not displayed.  You are not able to delete the items from the
record detail page, but you can from the items page.

Test plan:
1 - Place 1 or more title level holds on a record.
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
With this patch, that holds are accessible via the holds tab.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0e4b703d23)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 2903bc2909)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:49:19 +01:00
Jonathan Druart dead28ef19 Bug 15353: Display the patron image where needed
On the 3 following pages, the patron image was not displayed:
   members/discharge.pl
   members/pay.pl
   members/paycollect.pl

Test plan:
Apply this patch and confirm the image is now displayed

Followed test plan, image displays 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 bb0c2fce1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 64eb1f88ea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:45:30 +01:00
Jonathan Druart 1692d597e2 Bug 15398: Hide Staff members only in the patron deletion/anonymization tool
On bug 9076 (commit 568a4c1230), the plan
was to hide the Staff members from the tool.
But the test was wrong, it was done on the category_code instead of the
category_type value.

Test plan:
1/ Create a category 'Student' which is not part of the Staff
(category_code=S, category_type!=S)
2/ Create a staff category (category_type=S)
3/ Go on the deletion/anonymization tool (tools/cleanborrowers.pl) and
confirm that the category Student category is displayed in the dropdown
list.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no errors.

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

http://bugs.koha-community.org/show_bug.cgi?id=15308

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6f0cdee69b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 5349313187)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:40:42 +01:00
Jonathan Druart c5c3d47621 Bug 15391: Fix HoldsQueue.t tests
Prior to this patch, in HoldsQueue.t:
 63 my @item_types = C4::ItemType->all;
 64 my $itemtype = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");

Then we use the $itemtype variable (which contains the number of item types not for loan):

 92 $dbh->do("INSERT INTO biblioitems (biblionumber, marcxml, itemtype)
 93           VALUES                  ($biblionumber, '', '$itemtype')");

There is obviously something wrong here.

The code should be

 64 my @not_for_loan = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");
 66 my $itemtype = $not_for_loan[0]->{itemtype};

But then some tests don't pass:

Actually the problem comes from:
commit bfbc646fdd
  Bug 10336: HoldsQueue.t needs to create its own data

-my $itemtype = $dbh->selectrow_array("SELECT min(itemtype) FROM itemtypes WHERE notforloan = 0")
+my @item_types = C4::ItemType->all;
+my $itemtype = grep { $_->{notforloan} == 1 } @item_types

The line should have been:
my $itemtype = grep { $_->{notforloan} == 0 } @item_types

Test plan:
Confirm that the tests still pass after this patch applied.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
All tests pass pre and post patch

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b340d1f5bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 31ab3b277c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:39:55 +01:00
Marcel de Rooy c5cb615f9c Bug 9754: koha-remove optionally includes var/lib and var/spool
Currently, the files in the folder /var/lib/koha/[instance] and also
in /var/spool/koha/[instance] are not removed.
This patch adds the option -p|--purge-all to include those two
directories when removing files.

Note: There was a small bug in the for loop. On the -k line the extra
shift statement is one too much.

NOTE: Verify that you use the adjusted koha-remove in the test plan
and not accidentally an older version of this script.

Test plan:
[1] Create an instance test.
[2] Run koha-remove and verify that /var/lib/koha/test still exists.
[3] Create an instance test2.
[4] Run koha-remove -k -p and verify that the sql database still exists
    but the two instance folders in var/lib/koha and var/spool/koha are
    gone.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1d99fa026b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 69fd29942c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:38:56 +01:00
Jonathan Druart 11796d60fa Bug 15209: Check the parameter at the beginning of the subroutines
It seems better to check if parameters exist at the beginning of a
subroutine.
It makes the code easier to read and there is 1 indentation level less.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 372881ebfd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7132c9b49c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:38:14 +01:00
Jonathan Druart 87388b7d3a Bug 15209: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c273e888b0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit bc287802a9)
2016-02-11 19:37:22 +01:00
Colin Campbell 60e9074bec Bug 15209 Validate passed MARC::Record objs in C4::Koha
Ensure that a passed MARC::Record is defined before calling
its methods. Otherwise you are open to occurences of the
error 'Can't call method "field" on an undefined value'
In a CGI environment you can live with such sloppiness but
in a persistent environment the error can cause the instance
to abort.
Made all routines passed a MARC::Record validate it before calling
its methods. Changed the parameter name from the meaningless
record to marcrecord to indicate its content. Added an explicit return
for all cases where no valid data returned. Cleaned up some logic for
clarity. I think we can assume that GetNormalizedOCLCNumber meant to
look at all 035s till it found an OCLC number not just the first.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 960458dee4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 958985b2ff)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:33:50 +01:00
Marcel de Rooy 7d81810d14 Bug 15240: [QA Follow-up] Minor adjustments
This patch does:
[1] It removes some unused modules.
[2] It adds some options not listed in the synopsis.
[3] It removes an unused sql expression from one query.
    Note: In fines related code the third parameter of CalcFine sometimes
    is named as days_overdue too.
[4] Corrects a few typos in comments or pod.

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 8d072272fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b94fc3419d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:31:26 +01:00
Jonathan Druart 153877f10f Bug 15240: Do not process issues with a date due later than today
There is no need to do this job in Perl, MySQL could do it instead.
The idea is to only retrieve the issues info which could be overdued.

To test:
1/ Run the script
2/ Apply the patch
3/ Run the script again, notice the exact same results but execution time is faster

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0d36c27678)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e46923af88)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:21:30 +01:00
Kyle M Hall 7ab00713f0 Bug 15680 - Fresh install of Koha cannot find any dependencies
Revert "Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm"

This reverts commit 0e356b214e.

Fixing the evals in PerlModules.pm to pass perl critic has caused
a regression. If appears that using a block eval will not work here,
at least not in its current form.

(cherry picked from commit c2f667b4f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ff73d0415f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:13:31 +01:00