koha.git
8 years agoBug 15746: Do not record individual payments with randomly picked libraries
Jonathan Druart [Fri, 5 Feb 2016 10:46:28 +0000 (10:46 +0000)]
Bug 15746: Do not record individual payments with randomly picked libraries

When a payment is made individualy, the library used to record this
payment is randomly picked from the library list.
This is because C4::Branch::GetBranch looks at 1. the $branch variable
sent by the template, wich does not exist, then 2. the branchname
cookie, which does not exist neither, then 3. get the first branchcode
from a list of keys (non ordered).

To reproduce:
- Create a manual invoice for a patron
(members/maninvoice.pl?borrowernumber=XXXX)
- Pay this fine using the "Pay" button of the corresponding line from
  the members/pay.pl?borrowernumber=XXXX page
Look at the statistics table:
select * from statistics order by datetime desc limit 10;

The branch value of the first line might not correspond to the library
you were using to pay the payment.

Test plan:
Apply this patch, repeat the steps above and confirm that the library
picked is now the one used to pay.

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 Gallagher brendan@bywatersolutions.com
8 years agoBug 15756: Some tests for haspermission in C4::Auth
Marcel de Rooy [Mon, 8 Feb 2016 13:58:56 +0000 (14:58 +0100)]
Bug 15756: Some tests for haspermission in C4::Auth

Test plan:
Run this new test.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All tests successful. koha-qa.pl run OK.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15764: Fix timestamp sent by KOCT
Julian Maurice [Tue, 9 Feb 2016 10:16:55 +0000 (11:16 +0100)]
Bug 15764: Fix timestamp sent by KOCT

KOCT plugin send UTC timestamp, it should be converted to local timezone

Test plan:
1. Install latest version of KOCT and configure it
   https://addons.mozilla.org/fr/firefox/addon/koct/
   https://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin
2. Use it to do a checkout and a checkin. See that timestamps are UTC.
3. Click on "Commit to Koha" under "Log" tab
4. Wait for all operations to be processed
5. In Koha, go to Circulation > Offline circulation and check the
   timestamps were correctly converted to the Koha server's timezone
6. Process the pending operations and see that timestamps are still
   correct
7. Repeat step 2
8. Now click on "Apply directly"
9. Check the timestamps are correct in Koha

NOTE: I could not get "Commit to Koha" to work for me, but I did
      confirm this corrected behaviour with "Apply directly".

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Using the "commit to Koha" option works fine for me.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch only affects service.pl, which is not used in any way by the
uploader for desktop client files. No changes to the desktop offline
circ will be needed.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15790 - Don't delete a MARC framework if existing records use that framework
Owen Leonard [Thu, 11 Feb 2016 17:06:39 +0000 (12:06 -0500)]
Bug 15790 - Don't delete a MARC framework if existing records use that framework

If a MARC framework is in use by any records it should not be possible
to delete it. Deleting a framework which is in use will leave the
deleted framework code in those records.

This patch modifies the deletion confirmation dialog so that it will not
let the user confirm the deletion if there are records using it.

Depends on Bug 15785 - Use Font Awesome icons in confirmation dialogs

To test, apply the patch and go to Administration -> MARC frameworks

1. Try to delete a framework which is in use by 1 or more records. The
   resulting confirmation dialog should prevent you from proceeding.
2. Try to delete a framework which is not in use. Test both canceling
   and confirming that deletion to make both function correctly.

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
8 years agoBug 15785 - Use Font Awesome icons in confirmation dialogs
Owen Leonard [Thu, 11 Feb 2016 14:36:25 +0000 (09:36 -0500)]
Bug 15785 - Use Font Awesome icons in confirmation dialogs

We can simplify the staff client's CSS and reduce some image file usage
if we modify confirmation dialogs to use Font Awesome icons. This patch
makes this change for Administration templates.

This patch includes some whitespace changes, so please consider that
when looking at diffs.

To test, apply the patch and test deletion in the following cases. Test
both confirmation and cancel actions.

Administration -> Budgets -> Delete budget
Administration -> Funds -> Delete fund
Administration -> Authority types -> Delete authority type
Administration -> Authority types -> MARC Structure -> Delete tag
Administration -> Authority types -> MARC Structure -> Subfields -> Delete
Administration -> MARC bibliographic framework -> Delete framework
Administration -> MARC bibliographic framework -> MARC structure -> Delete
Administration -> Cities and Towns -> Delete city
Administration -> Classification sources -> Delete classification source
Administration -> Classification sources -> Delete classification filing rule
Administration -> Item types -> Delete
Administration -> Record matching rules -> Delete
Administration -> Patron attribute types -> Delete

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoDBRev for Bug 13534 [Followup] - Remove tabs and atomic update file
Kyle M Hall [Tue, 23 Feb 2016 15:43:29 +0000 (15:43 +0000)]
DBRev for Bug 13534 [Followup] - Remove tabs and atomic update file

8 years agoDBRev for Bug 13534 - Deleting staff patron will delete tags approved by this patron
Brendan Gallagher [Tue, 23 Feb 2016 15:33:41 +0000 (15:33 +0000)]
DBRev for Bug 13534 - Deleting staff patron will delete tags approved by this patron

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13534: Do not remove tags on deleting a patron
Jonathan Druart [Wed, 13 Jan 2016 14:34:29 +0000 (14:34 +0000)]
Bug 13534: Do not remove tags on deleting a patron

On deleting a patron, all the tags approved by this user will be
deleted.
This can cause data lost.

Test plan:
0/ Do not execute the update DB entry
1/ Create 2 patrons A, B
2/ Create some tags with patron A logged in
3/ Approve them with patron B logged in
4/ Delete the 2 patrons
=> The tags have been deleted
5/ Execute the DB entry
6/ Repeat 1,2,3,4
=> The tags have not been deleted and are still shown on the interface
(result, detail, tags module)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15643 - Every datepicker on serials expected date column updates top issue
Lyon3 Team [Tue, 26 Jan 2016 11:40:11 +0000 (12:40 +0100)]
Bug 15643 - Every datepicker on serials expected date column updates top issue

delete 'expected' and 'supexpected' ids that don't seem useful anymore.
Same thing for changeDate2 function

Test plan :
1) Search a serial subscription from the Serials Home page
2)Go to serial collection page and make sure it has a mimimal bunch of
already received  or missing issues
3)Check some received issues to be sure to get extra issues (not only
the extected one) in the serial edition page
4) Click on Edit serials button
5) Try to modify whatever date in 'Expected on' column (excepted first
one) using datepicker :
You can see that the top date of the column is updated instead of the
choosen one.
6) Apply patch and redo 1 to 5 steps :
now the right date is updated.

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
8 years agoBug 15645: Remove the confusing wait var and use found instead
Jonathan Druart [Mon, 1 Feb 2016 13:13:10 +0000 (13:13 +0000)]
Bug 15645: Remove the confusing wait var and use found instead

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15645 - In transit holds do not show as in transit on request.pl
Kyle M Hall [Fri, 22 Jan 2016 16:36:26 +0000 (16:36 +0000)]
Bug 15645 - In transit holds do not show as in transit on request.pl

A hold in transit will simply appear as an unfilled hold!

Test Plan:
1) Place a hold for pickup at a different location
2) Capture that hold for a patron
3) Note you do not see the in transit status on request.pl
4) Apply this patch
5) Refresh the page
6) The hold should now show as in transit!

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
8 years agoDeleting the atomic update for bug Bug 15736 - Add a preference to control whether...
Brendan Gallagher [Mon, 22 Feb 2016 20:47:49 +0000 (20:47 +0000)]
Deleting the atomic update for bug Bug 15736 - Add a preference to control whether all items should be shown in checked-in items list

8 years agoUpdating the DB Rev for Bug 15736 - Add a preference to control whether all items...
Brendan Gallagher [Mon, 22 Feb 2016 20:46:52 +0000 (20:46 +0000)]
Updating the DB Rev for Bug 15736 - Add a preference to control whether all items should be shown in checked-in items list

8 years agoBug 15736 [QA Followup] - Make add more details to the syspref description
Kyle M Hall [Sun, 14 Feb 2016 14:12:50 +0000 (14:12 +0000)]
Bug 15736 [QA Followup] - Make add more details to the syspref description

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15736: Add ShowAllCheckins pref to control the display of checked-in item list...
Jonathan Druart [Fri, 12 Feb 2016 09:07:09 +0000 (09:07 +0000)]
Bug 15736: Add ShowAllCheckins pref to control the display of checked-in item list on checking

Bug 14821 removed the items which were not checked out, but some
libraries considered it as a bug.
So let's add a new pref to control this behavior.

Test plan:
0/ Execute the updatedb entry and set ShowAllCheckins to "Do not show"
(default)
1/ Check an item in.
If the item was not checked out, it won't be listed
2/ Turn the pref to "Show"
3/ Check an item in
If the item was not checked out, it should be listed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15810: Make sure the CGI->param is not called in a list context when creating...
Jonathan Druart [Fri, 12 Feb 2016 14:33:57 +0000 (14:33 +0000)]
Bug 15810: Make sure the CGI->param is not called in a list context when creating private shelves

This patch fixes the following bug:
If OpacAllowPublicListCreation is set to "not allow", the creation of a
private list raises an error at the OPAC.

CGI->param is called in a list context and some parameters are not
filled from the template if the pref is set to "not allow".
To make sure we don't have a "Odd number of elements in anonymous hash",
we force the context to scalar.

Test plan:
1/ Set OpacAllowPublicListCreation to "not allow"
2/ Create private and public lists at the OPAC and the intranet
=> Everything should work fine with this patch applied

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15818 - OPAC search with utf-8 characters and without results generates encoding...
Dobrica Pavlinusic [Mon, 15 Feb 2016 14:23:19 +0000 (15:23 +0100)]
Bug 15818 - OPAC search with utf-8 characters and without results generates encoding error

When searching for something in OPAC which doesn't result in any results but have utf-8
characters in search string we get following encoding error:

Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215.

This is because we are trying to decode string which is allready correctly
marked as utf-8.

Test scenario:

1) enter search string with utf-8 characters in opac which doesn't
   return any results
2) verify that you get application error
3) apply this patch
4) re-run query and verify that errror is gone

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Step 0: Define "OPACNoResultsFound" with '{QUERY_KW}'
Note that I don't get the error (Encode 2.60) but the search terms are
not display correctly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The variable to be decoded comes from already decoded vars (via
the -utf8 flag from CGI), following the trail in Search.pm.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years ago Bug 11081: (followup) Rebuild debian/control
Tomas Cohen Arazi [Tue, 16 Feb 2016 14:06:09 +0000 (11:06 -0300)]
 Bug 11081: (followup) Rebuild debian/control

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years agoBug 9021: Update Koha.pm to DBrev 3.23.000.020
Kyle M Hall [Sun, 14 Feb 2016 14:03:32 +0000 (14:03 +0000)]
Bug 9021: Update Koha.pm to DBrev 3.23.000.020

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021: DBrev 3.23.000.020
Kyle M Hall [Sun, 14 Feb 2016 12:50:00 +0000 (12:50 +0000)]
Bug 9021: DBrev 3.23.000.020

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021: Save the provider even if the sms number is not modified
Jonathan Druart [Mon, 15 Feb 2016 16:26:53 +0000 (16:26 +0000)]
Bug 9021: Save the provider even if the sms number is not modified

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021: Fix conflict with bug 15446 (type vs _type)
Jonathan Druart [Mon, 15 Feb 2016 16:26:18 +0000 (16:26 +0000)]
Bug 9021: Fix conflict with bug 15446 (type vs _type)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Add additional message to deletion warning if provider is...
Kyle M Hall [Thu, 11 Feb 2016 10:43:40 +0000 (10:43 +0000)]
Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Unit tests
Kyle M Hall [Thu, 11 Feb 2016 06:53:15 +0000 (06:53 +0000)]
Bug 9021 [QA Followup] - Unit tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion
Kyle M Hall [Wed, 10 Feb 2016 10:28:37 +0000 (10:28 +0000)]
Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Add feedback to delete button if provider is being used
Kyle M Hall [Wed, 10 Feb 2016 10:19:00 +0000 (10:19 +0000)]
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used

* Change links to buttons
* Add warning class to delete button if provider is being used

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Switch to Koha::Object(s)
Kyle M Hall [Tue, 9 Feb 2016 15:45:55 +0000 (15:45 +0000)]
Bug 9021 [QA Followup] - Switch to Koha::Object(s)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting
Kyle M Hall [Tue, 9 Feb 2016 15:23:36 +0000 (15:23 +0000)]
Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Fix ENGINE, don't create index on FK
Kyle M Hall [Tue, 9 Feb 2016 14:52:45 +0000 (14:52 +0000)]
Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Use Modern::Perl
Kyle M Hall [Tue, 9 Feb 2016 14:47:13 +0000 (14:47 +0000)]
Bug 9021 [QA Followup] - Use Modern::Perl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script
Kyle M Hall [Tue, 9 Feb 2016 14:45:51 +0000 (14:45 +0000)]
Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021: Flag issues
Mark Tompsett [Fri, 1 Jan 2016 05:30:40 +0000 (00:30 -0500)]
Bug 9021: Flag issues

Check in and check out were failing for me.
Specificly, the $borrower->{flags}->{...} was not accessible as
a hash, so I put a hash ref check around the code that would fail.

TEST PLAN
---------
1) Attempt a checkout
   -- blows up with "1" not being allowed as a hash ref.
2) Apply patch
3) Attempt same checkout again
   -- success
4) prove -v t/db_dependent/Circulation_dateexpiry.t
   -- this triggers CanBookBeIssued
   -- this should succeed
5) prove -v t/db_dependent/rollingloans.t
   -- mine skipped the tests, but if configured, it
      should also trigger and succeed.
6) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021: Schema update
Mark Tompsett [Thu, 31 Dec 2015 21:49:31 +0000 (16:49 -0500)]
Bug 9021: Schema update

This ensures that the DBIx structure matches the SQL structure changes.
See comment #48 as to how this was generated.
Also, I had to modify misc/devel/update_dbix_class_files.pl
to have an "overwrite_modifications => 1" option to get it to generate.
This should correct issues raised in comment #45.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Kyle M Hall [Tue, 26 Feb 2013 14:12:03 +0000 (09:12 -0500)]
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Nearly all cellular providers allow a person to send an text message to a cellular
phone by sending an email to phonenumber@provider. We can leverage this capability
to add the ability for Koha to send sms messages to patrons without the need to
subscribe to an sms gateway server.

Basic plan:
1. Add a table sms_providers to the db to tell Koha what service providers are available, and what domain emails should be sent to.
2. Add borrowers.sms_provider_id to tell Koha which mobile service the patron subscribes to for the number given in smsalertnumber
3. Modify Koha to send an email rather than using SMS::Send if the driver is set to 'Email'

Test plan:
0) Get a mobile phone
1) Apply the patch
2) Run updatedatabase.pl
3) Set the value of SMSSendDriver to 'Email'
4) Go to the admin page, the "Additional parameters" area should now have the link "SMS cellular providers"
5) On this page, add some providers. Make sure to add the provider for your own cellular phone service.

Here are some examples:
Sprint   phonenumber@messaging.sprintpcs.com
Verizon  phonenumber@vtext.com
T-Mobile phonenumber@tmomail.net
AT&T     phonenumber@txt.att.net

Only add the domain part in the 'domain' field. So for Verizon, that would be 'vtext.com'

6) Create an account for yourself, add your SMS number, and select your provider from the dropdown box directly below it.

7) Enable SMS messaging for Item check-in and Item checkout
8) Check out an item to yourself
9) Run process_message_queue.pl
10) Wait! You should receive a text message shortly, when I tested it, I received my sms message within the minute.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15411: DBrev 3.23.000.019 (part 2)
Jesse Weaver [Fri, 12 Feb 2016 19:43:32 +0000 (12:43 -0700)]
Bug 15411: DBrev 3.23.000.019 (part 2)

Update Koha.pm and updatedatabase.pl.

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15411: DBrev 3.23.000.019
Jesse Weaver [Fri, 12 Feb 2016 19:43:32 +0000 (12:43 -0700)]
Bug 15411: DBrev 3.23.000.019

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15411: More changes
Aleisha [Wed, 6 Jan 2016 00:21:54 +0000 (00:21 +0000)]
Bug 15411: More changes

Changes to Italian and Polish sql files and catalogue help file.

TEST PLAN
---------
1) Confirm sql is valid and has Non-fiction.
   > delete from auth_vals;
   > source {appropriate file};
2) Staff -> Search -> Help
   -- Confirm Non-fiction
3) 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: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15411: Changing 'Non fiction' to 'Non-fiction'
Aleisha [Tue, 22 Dec 2015 21:50:37 +0000 (21:50 +0000)]
Bug 15411: Changing 'Non fiction' to 'Non-fiction'

To test:

1) Apply patch
2) Run updatedatabase.pl
3) Go to advanced search in Staff Client (ie /cgi-bin/koha/catalogue/search.pl)
4) Confirm that it says 'Non-fiction' in the 'Any content' drop-down menu under 'Subtype limits'
5) Go to item search (ie /cgi-bin/koha/catalogue/itemsearch.pl)
6) Confirm that it says 'Non-fiction' under 'Collection code'
7) Go to advanced search in OPAC (ie /cgi-bin/koha/opac-search.pl) and click 'More options'
8) Confirm that it says 'Non-fiction' in the 'Content' drop-down menu
9) Go to the details page for a non-fiction book in the OPAC (ie /cgi-bin/koha/opac-detail.pl?biblionumber=2) and click 'Holdings' tab
10) Confirm that it says 'Non-fiction' under 'Collection' heading

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446 - DBrev 3.23.000.018
Jesse Weaver [Fri, 12 Feb 2016 19:43:32 +0000 (12:43 -0700)]
Bug 15446 - DBrev 3.23.000.018

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446 [QA Followup] - Update new classes
Kyle M Hall [Thu, 11 Feb 2016 10:02:56 +0000 (10:02 +0000)]
Bug 15446 [QA Followup] - Update new classes

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446: (follow-up) Rename Koha::Object[s]->type with _type
Jonathan Druart [Tue, 5 Jan 2016 15:24:46 +0000 (15:24 +0000)]
Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type

Some occurrences have been pushed in the meantime.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446: Update systempreferences rows where type=YesNo and value=''
Jonathan Druart [Wed, 30 Dec 2015 17:19:02 +0000 (17:19 +0000)]
Bug 15446: Update systempreferences rows where type=YesNo and value=''

Signed-off-by: Marc Véron <veron@veron.ch>
Amended to fix typo in sql statement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446: Rename Koha::Object[s]->type with _type
Jonathan Druart [Wed, 30 Dec 2015 17:15:31 +0000 (17:15 +0000)]
Bug 15446: Rename Koha::Object[s]->type with _type

In a few case (at least systempreferences and export_format (csv profiles),
the type method of Koha::Object and Koha::Objects can be in conflict with the
column names.
Indeed systempreferences.type exists and so the method will return
'Systempreference' (the name of the module) instead of the value of the row in
DB.

I have found at least 1 place where it can cause issue:
In C4::Context->set_preference:
 601     my $syspref = Koha::Config::SysPrefs->find( $var );
 602     my $type = $syspref ? $syspref->type() : undef;
 603
 604     $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );

type will always be 'Systempreference' and the YesNo pref will be set to an
empty string '' instead of 0.

I am not sure about the consequences of this, but it is preferable to
fix it ASAP.

To reproduce:
0/ Do not apply this patch
1/ Edit a YesNo prefs, AutoEmailOpacUser for instance
2/ Set it to "Don't sent"
3/ Check the value in DB, it should be set to an empty string, instead
of 0
4/ Apply this patch and try again. Now the value should be 0

Followed test plan, value is now 0 as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15446: Add tests
Jonathan Druart [Wed, 30 Dec 2015 17:11:45 +0000 (17:11 +0000)]
Bug 15446: Add tests

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15760: Fix order by direction for shelves
Jonathan Druart [Thu, 11 Feb 2016 11:32:43 +0000 (11:32 +0000)]
Bug 15760: Fix order by direction for shelves

The order_by parameters should not be "$direction $order_by" with
quote_names enabled. The correct syntax is { -$direction => $order_by }

Test plan for Opac + Staff interfces:
Sort list by title or whatever and change the direction

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15760: Avoid SQL injections
Jonathan Druart [Thu, 11 Feb 2016 10:16:12 +0000 (10:16 +0000)]
Bug 15760: Avoid SQL injections

Asking on #dbix-class, ribasushi told me to set quote_names to the
connection options.

Indeed it does the fix, globally :)

Test plan:
1/ Add the following snippet to the a script (mainpage.pl is a good candidate)
 use Koha::Virtualshelves;
 my $s = Koha::Virtualshelves->search({}, { order_by => '1,(select case when (3*2*1=6 AND 000227=000227) then 1 else 1*(select table_name from information_schema.tables)end)=1' });
 $s->next;
2/ Execute the script
=> Without the patch, you should not get any error. If you have the mysql logs
enable, you will see the query
=> With the patch applied, you will get a "unknown column" error

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoRevert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance...
Kyle M Hall [Thu, 11 Feb 2016 01:26:46 +0000 (01:26 +0000)]
Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues

Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a594576180b846cf9299bee4629442c84.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00efc62bbeb54260350f6f402d2e5e98.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111fb701df68862afc6b23a7bfc774787b.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92503885f4f88e4cb6ca4c555fb28ee8.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243feaef07586779d7943e00bbda6023db3.

Revert "Bug 13618: Do not display &nbsp; and html tags in item fields content"

This reverts commit baeeaffbf894d6eb7d12666071d2d9b9ab66e874.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261fb2eebf27cc4a2c523122432a37203.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10197b1d92f2fb8ad50206e598a571e6.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e53d8c5774a952bcf620335fbf77c004.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c95b13810bac57a2da9514ff37f570d.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402593127074ad47a81098f3aad389c94.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c8c2392b85d4c3232309ded66f3b8f1.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b319d8a99ea611b76bad80c4d47004c.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020aeec7d56faa7170cbad3319a8245379.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25e89d900d57e07f8e3de7b398090980.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29e16d94a5ed81eb9e29b84f7e166d6c.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3cf57c31bad4b11370b53aafd4d4806.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3bcd2c3550578e8f2dd188a7701c77fb.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 782487455770a59ab7b30b5e92a1a66c28d30b88.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da367321771530331e7420ffa94d52979.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b25310ea0876b087b729cf0b3a2ad7b1e6.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c6f86aa136158e1459d800d9530e243.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435a9ada5dffa8b5ef1c2a19f5d525f5e.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68f8089777b824203f3878735ff96591.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3402a043e31915d1a7b29aec3605433.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03a168fa46d56bb0e472be249dbd5410.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d54580e80e92e74fdba0483008b5cfd.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e0927884f1c5ef2cafde4bcdd6d55ff.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13f09b927201cba5eb146b6597d4bfeb.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15684: Fix encoding issues with quote upload
Marc Véron [Thu, 28 Jan 2016 21:05:58 +0000 (22:05 +0100)]
Bug 15684: Fix encoding issues with quote upload

To verify:
- Download attachment 'Goethe with umlaut' from Bug 15684
- Go to Tools > Quote Editor
- Click "Import quotes" and select the file
- The quotes display in a table. Click 'Sav quotes'
- Result: Nothing happens

To test:
- Apply patch
- Repeat steps above
- Verify that you get a message '2 quotes saved' and that the quotes
  are added in to the quotes table
- Test with attachment 'sample quotes' as well

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
8 years agoBug 15358: Fix authorities merge
Julian Maurice [Wed, 6 Jan 2016 18:11:27 +0000 (19:11 +0100)]
Bug 15358: Fix authorities merge

Bug 8064 (Merge several biblio records) change some code used in both
biblios and authorities merge tool without updating the authorities
merge tool.
This patch fixes that.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15687 [QA Followup] - Tidy sub to remove tab characters
Kyle M Hall [Thu, 28 Jan 2016 21:24:52 +0000 (21:24 +0000)]
Bug 15687 [QA Followup] - Tidy sub to remove tab characters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15687: Fix xgettext.pl syntax errors
Julian Maurice [Thu, 28 Jan 2016 08:32:11 +0000 (09:32 +0100)]
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>
8 years agoDBRev to make notes of the XSS patches and the new important dependency.
Brendan Gallagher [Fri, 29 Jan 2016 18:06:28 +0000 (18:06 +0000)]
DBRev to make notes of the XSS patches and the new important dependency.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 13618: Specific for branches.opac_info
Jonathan Druart [Mon, 18 Jan 2016 11:18:11 +0000 (11:18 +0000)]
Bug 13618: Specific for branches.opac_info

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: (follow-up) Specific for other prefs
Jonathan Druart [Thu, 7 Jan 2016 09:34:52 +0000 (09:34 +0000)]
Bug 13618: (follow-up) Specific for other prefs

follow-up for SlipCSS and printslip

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix for debarredcomment and patron messages
Jonathan Druart [Thu, 7 Jan 2016 09:32:28 +0000 (09:32 +0000)]
Bug 13618: Fix for debarredcomment and patron messages

At the OPAC and intranet.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Do not display html tags in patron's notices
Jonathan Druart [Thu, 7 Jan 2016 09:31:11 +0000 (09:31 +0000)]
Bug 13618: Do not display html tags in patron's notices

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Do not display &nbsp; and html tags in item fields content
Jonathan Druart [Thu, 7 Jan 2016 09:29:14 +0000 (09:29 +0000)]
Bug 13618: Do not display &nbsp; and html tags in item fields content

Note that there might be other occurrences to fix!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix for system preference description
Jonathan Druart [Thu, 7 Jan 2016 09:28:26 +0000 (09:28 +0000)]
Bug 13618: Fix for system preference description

If a syspref description contains html tag, do not display them

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Remove html filters for newly pushed code
Jonathan Druart [Mon, 4 Jan 2016 11:58:50 +0000 (11:58 +0000)]
Bug 13618: Remove html filters for newly pushed code

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: (follow-up) add missing lines for opac-shelves
Bernardo Gonzalez Kriegel [Thu, 17 Dec 2015 22:48:32 +0000 (19:48 -0300)]
Bug 13618: (follow-up) add missing lines for opac-shelves

Proposed patch to fix opac-shelves

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: (follow-up) Specific for ColumnsSettings
Jonathan Druart [Thu, 17 Dec 2015 12:23:00 +0000 (12:23 +0000)]
Bug 13618: (follow-up) Specific for ColumnsSettings

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix for edit biblios and items
Jonathan Druart [Tue, 1 Dec 2015 12:56:56 +0000 (12:56 +0000)]
Bug 13618: Fix for edit biblios and items

On editing biblios or items, the marc_lib, marc_value and javascript
values are often populated with html code which needs to be displayed
raw.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: followup to remove tabs
Bernardo Gonzalez Kriegel [Wed, 25 Nov 2015 11:40:29 +0000 (08:40 -0300)]
Bug 13618: followup to remove tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This followup on top of remote branch
Only remove tabs and trailing spaces to make koha-qa pass

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix last occurrences recently introduced to master
Jonathan Druart [Thu, 22 Oct 2015 08:06:55 +0000 (09:06 +0100)]
Bug 13618: Fix last occurrences recently introduced to master

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix for news
Jonathan Druart [Tue, 1 Sep 2015 07:55:10 +0000 (08:55 +0100)]
Bug 13618: Fix for news

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix escape on sending baskets or shelves by email
Jonathan Druart [Fri, 28 Aug 2015 13:46:41 +0000 (14:46 +0100)]
Bug 13618: Fix escape on sending baskets or shelves by email

Test plan:
Send baskets and shelves by email.
With or without this patch, you should not see any changes.

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for XSLTBloc
Jonathan Druart [Fri, 28 Aug 2015 12:01:14 +0000 (13:01 +0100)]
Bug 13618: Specific for XSLTBloc

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for Salutation on editing a patron
Jonathan Druart [Thu, 27 Aug 2015 08:17:03 +0000 (09:17 +0100)]
Bug 13618: Specific for Salutation on editing a patron

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for other prefs
Jonathan Druart [Fri, 21 Aug 2015 11:05:01 +0000 (12:05 +0100)]
Bug 13618: Specific for other prefs

opacmainuserblock
opacnav
opacnavright
opaccredits
opacheader
opaccustomsearch
opacmysummaryhtml
opacmysummarynote
opacnavbottom
opacnoresultsfound
opacresultssidebar
opacsearchfortitlein
restrictedpagecontent
PatronSelfRegistrationAdditionalInstructions
intranetmainuserblock
intranetnav
intranetslipprinterjs
OpacSuppressionMessage
SCOUserCSS
SCOUserJS
SelfCheckHelpMessage
NoLoginInstructions

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618 - memberentrygen.tt errors Not a GLOB reference
Liz Rea [Thu, 20 Aug 2015 22:23:54 +0000 (10:23 +1200)]
Bug 13618 - memberentrygen.tt errors Not a GLOB reference

Like Jonathan said:
The interpolation of a variable on including a file caused an unexpected
error:
Template process failed: undef error - Not a GLOB reference at
/usr/lib/i386-linux-gnu/perl5/5.20/Template/Provider.pm line 619.

Replaced it with a SWITCH, like the other patch for this similar error.

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for ColumnsSettings
Jonathan Druart [Tue, 4 Aug 2015 15:11:34 +0000 (16:11 +0100)]
Bug 13618: Specific for ColumnsSettings

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for IntranetUser* and OPACUser* prefs
Jonathan Druart [Tue, 4 Aug 2015 15:08:32 +0000 (16:08 +0100)]
Bug 13618: Specific for IntranetUser* and OPACUser* prefs

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Fix error 'Not a GLOB reference'
Jonathan Druart [Tue, 4 Aug 2015 14:51:55 +0000 (15:51 +0100)]
Bug 13618: Fix error 'Not a GLOB reference'

The interpolation of a variable on including a file caused an unexpected
error:
Template process failed: undef error - Not a GLOB reference at
/usr/lib/i386-linux-gnu/perl5/5.20/Template/Provider.pm line 619.

The easier fix is to replace it with a SWITCH.

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for the ISBD view
Jonathan Druart [Mon, 22 Jun 2015 15:29:10 +0000 (17:29 +0200)]
Bug 13618: Specific for the ISBD view

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific for pagination_bar
Jonathan Druart [Mon, 22 Jun 2015 15:23:52 +0000 (17:23 +0200)]
Bug 13618: Specific for pagination_bar

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific places where we don't need to escape variables - intra
Jonathan Druart [Mon, 22 Jun 2015 15:14:51 +0000 (17:14 +0200)]
Bug 13618: Specific places where we don't need to escape variables - intra

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Remove html filters at the intranet
Jonathan Druart [Mon, 22 Jun 2015 15:13:15 +0000 (17:13 +0200)]
Bug 13618: Remove html filters at the intranet

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Specific places where we don't need to escape variables
Jonathan Druart [Mon, 22 Jun 2015 14:44:34 +0000 (16:44 +0200)]
Bug 13618: Specific places where we don't need to escape variables

There is no need to escape the html generated by the XSLT.

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Remove html filters at the OPAC
Jonathan Druart [Mon, 22 Jun 2015 14:44:05 +0000 (16:44 +0200)]
Bug 13618: Remove html filters at the OPAC

This patch removes the html filters at the OPAC, if necessary.

Generated with:
  perl -p -i -e 's/\ ?\|\ ?html(\ ?)%/\1%/g' **/*.tt **/*.inc

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 13618: Use Template::Stash::AutoEscaping to use the html filter
Jonathan Druart [Fri, 23 Jan 2015 12:18:54 +0000 (13:18 +0100)]
Bug 13618: Use Template::Stash::AutoEscaping to use the html filter

Test plan:
0/ sudo cpanm Template::Stash::AutoEscaping
1/ Verify don't reproduce the XSS issue described on bug 13609 and other
xss related bugs.
2/ Try to find some encoding issues (detail page, search results,
facets, etc.)

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoRemoving atomicupdate file.
Brendan Gallagher [Fri, 29 Jan 2016 17:51:03 +0000 (17:51 +0000)]
Removing atomicupdate file.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoDBRev for Bug 14893 - Separate temporary storage per instance in Upload.pm
Brendan Gallagher [Fri, 29 Jan 2016 17:49:33 +0000 (17:49 +0000)]
DBRev for Bug 14893 - Separate temporary storage per instance in Upload.pm

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14893: Separate temporary storage per instance in Upload.pm
Marcel de Rooy [Fri, 25 Sep 2015 06:50:17 +0000 (08:50 +0200)]
Bug 14893: Separate temporary storage per instance in Upload.pm

To make life easier when multiple instances are uploading temporary
files to Koha, this patch adds the database name to the upload subfolder
in your /tmp folder.

Note: Although multiple instances could share the same subfolder for
temporary storage (hashvalue is based on a timestamp too), it will be
better to separate them for efficient housekeeping (removing older or
partial files with a cronjob etc.)
Since multiple instances come with separate permissions, keeping them in
separate folders will be much simpler.

Permanent storage is not affected by this patch. The location of permanent
storage is ruled by the upload_path in each config file. Sharing that
space is not recommended too.

Although it may not be strictly necessary yet to remove files from the old
temp storage folder (before the 3.22 release), the accompanying db rev
performs that housekeeping task.

Test plan:
[1] Do not yet apply this patch. Upload a temporary file (use the
    tools/upload.pl script without selecting a category).
[2] Check /tmp/koha_upload.
[3] Apply this patch. Run the db rev with web installer.
[4] Upload another temporary file.
[5] Check /tmp for folder [your_database]_upload.
[6] Check that /tmp/koha_upload is gone and the associated records too.
[7] Run the adjusted t/db../Upload.t

Followed test plan. Could not do steps before applying patch [1]-[2]
(I suppose a local permission problem).
After applying patch and updating db file appears in /tmp/[database]
as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years ago Bug 15240: [QA Follow-up] Minor adjustments
Marcel de Rooy [Wed, 27 Jan 2016 14:44:31 +0000 (15:44 +0100)]
 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>
8 years ago Bug 15240: Do not process issues with a date due later than today
Jonathan Druart [Wed, 9 Dec 2015 11:10:33 +0000 (11:10 +0000)]
 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>
8 years agoBug 8753 [QA Followup] - Add notice to translations
Kyle M Hall [Wed, 27 Jan 2016 18:29:30 +0000 (18:29 +0000)]
Bug 8753 [QA Followup] - Add notice to translations

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 12636: Do not display unique patron attributes in the batch patron modification
Jonathan Druart [Mon, 21 Dec 2015 12:31:59 +0000 (12:31 +0000)]
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
8 years agoBug 14828 [QA Followup] - Hide in OPAC checkbox not checked in editor even if enabled
Kyle M Hall [Fri, 15 Jan 2016 19:14:14 +0000 (19:14 +0000)]
Bug 14828 [QA Followup] - Hide in OPAC checkbox not checked in editor even if enabled

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 14828: use Koha::ItemType[s] in admin/itemtypes
Jonathan Druart [Tue, 15 Sep 2015 13:20:22 +0000 (14:20 +0100)]
Bug 14828: use Koha::ItemType[s] in admin/itemtypes

Test plan:
Add/edit/remove item types from the administration module
(admin/itemtypes.pl).
You should get message feedback after each action.
Don't forget to play with the image and try to remove an item type
linked to records (you should not be able to remove it).

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 14828: Remove old package and tests
Jonathan Druart [Tue, 15 Sep 2015 16:03:44 +0000 (17:03 +0100)]
Bug 14828: Remove old package and tests

C4::ItemType can be now removed safely, there is no use of this module.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used
Jonathan Druart [Tue, 15 Sep 2015 16:03:04 +0000 (17:03 +0100)]
Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used

This patch mainly replaces C4::ItemType->all with
Koha::ItemTypes->search.

Test plan:
At the places where the C4::ItemType module was used, confirm there is
no regression:
- acqui/neworderempty.pl
- catalogue/itemsearch.pl
- admin/item_circulation_alerts.pl
and the 2 cataloguing plugins:
- marc21_linking_section.pl
- unimarc_field_4XX.pl

QA step:
prove t/db_dependent/HoldsQueue.t should return green
Note that the tests were buggy.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 14828: Add Koha::ItemType[s] classes
Jonathan Druart [Tue, 15 Sep 2015 16:02:28 +0000 (17:02 +0100)]
Bug 14828: Add Koha::ItemType[s] classes

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoDBRev for bug 8753 (removing the atomicupdate too).
Brendan Gallagher [Wed, 27 Jan 2016 17:58:47 +0000 (17:58 +0000)]
DBRev for bug 8753  (removing the atomicupdate too).

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15353: Display the patron image where needed
Jonathan Druart [Tue, 5 Jan 2016 14:37:20 +0000 (14:37 +0000)]
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
8 years agoBug 15680 - Fresh install of Koha cannot find any dependencies
Kyle M Hall [Wed, 27 Jan 2016 16:15:42 +0000 (16:15 +0000)]
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 0e356b214eb049a446a8d089d579775aa49287d7.

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.

8 years agoBug 8753: [QA Follow-up] Primary key and collation
Marcel de Rooy [Fri, 22 Jan 2016 09:18:29 +0000 (10:18 +0100)]
Bug 8753: [QA Follow-up] Primary key and collation

This patch includes:
[1] Adds primary key borrowernumber to new table.
[2] Fixes collation.
[3] Removes manual PK in DBIx schema file.
[4] Fixes typo CompletePasswordRevovery.
[5] Removes use strict from opac-password-recovery; Modern::Perl is used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - propagating the changes to kohastructure.sql and sysprefs.sql
Charles Farmer [Mon, 30 Nov 2015 14:20:57 +0000 (09:20 -0500)]
Bug 8753 - propagating the changes to kohastructure.sql and sysprefs.sql

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Looks good with a new install.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - Various little things - removing new dependency, changes to errors, textua...
Liz Rea [Wed, 7 Oct 2015 02:08:10 +0000 (15:08 +1300)]
Bug 8753 - Various little things - removing new dependency, changes to errors, textual updates

Koha already has a sub that creates salts, so lets use that instead of math::Random::secure, so as not to add a new dependency.

Made the references to "Forgotten password" consistent, including adding it to the title of the page.

Also removed the individual error for "this email doesn't belong to this account" as that could expose the existence of a login, which I think we'd rather not do.

Made some of the text more grammatically correct, and more library specific.

To test:

Apply on top of all of the other patches.

All the usual checks, plus make sure there are no typos in any text references.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - Smartmatch substitute, Math::Random::Secure, Perltidy, Passwordrecovery.t
Charles Farmer [Wed, 30 Sep 2015 14:03:05 +0000 (10:03 -0400)]
Bug 8753 - Smartmatch substitute, Math::Random::Secure, Perltidy, Passwordrecovery.t

This is a collection of changes taken from different comments (but mostly comment 21 and comment 122).

Passes qa and prove, on my machine at least.

There's also a new test file, Passwordrecovery.t, which covers every method of C4::Passwordrecovery.

To test:

All normal checks plus :

    1/ Receive the email
    2/ Click on the link
    3/ Change the pwd
    4/ Click again on the link
    5/ You should immediately get an error message

Problems with Math/Random/Secure.pm, is solved in following patch, signing off
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - [followup] POD cleanup
Liz Rea [Wed, 19 Aug 2015 22:52:59 +0000 (10:52 +1200)]
Bug 8753 - [followup] POD cleanup

Check to make sure the messages from the qa checker are gone.

Note I'm not sure about this one because my test tools are apparently broken, and I can't get the error to manifest.

Amended patch by Jonathan Druart: Add a blank line before =head2
It now passes.

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