Commit graph

25677 commits

Author SHA1 Message Date
1cb371689d 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
2016-02-23 20:54:42 +00:00
Julian Maurice
0987165d6a 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
2016-02-23 20:53:18 +00:00
385380038b 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
2016-02-23 20:51:51 +00:00
5939c4b233 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
2016-02-23 20:46:05 +00:00
c00169e536 DBRev for Bug 13534 [Followup] - Remove tabs and atomic update file 2016-02-23 15:43:29 +00:00
Brendan Gallagher
a66674a964 DBRev for Bug 13534 - Deleting staff patron will delete tags approved by this patron
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-23 15:33:41 +00:00
fb419ba83d 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
2016-02-23 15:25:49 +00:00
Lyon3 Team
4c6214f5c9 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
2016-02-23 15:24:28 +00:00
d6dc21bc3c 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
2016-02-22 20:52:44 +00:00
ff0843dca0 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
2016-02-22 20:52:44 +00:00
Brendan Gallagher
15d2305caa Deleting the atomic update for bug Bug 15736 - Add a preference to control whether all items should be shown in checked-in items list 2016-02-22 20:47:49 +00:00
Brendan Gallagher
74dde4d2c6 Updating the DB Rev for Bug 15736 - Add a preference to control whether all items should be shown in checked-in items list 2016-02-22 20:46:52 +00:00
f92ef6207b 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
2016-02-22 20:34:18 +00:00
ce6c3bb88b 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
2016-02-22 20:34:18 +00:00
d6329e4f96 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
2016-02-22 20:32:18 +00:00
Dobrica Pavlinusic
ea69693997 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
2016-02-22 20:28:13 +00:00
Tomas Cohen Arazi
43bcc1c42c 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>
2016-02-16 18:52:36 +00:00
0700b421d3 Bug 9021: Update Koha.pm to DBrev 3.23.000.020
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-02-14 14:03:32 +00:00
326b4c046e Bug 9021: DBrev 3.23.000.020
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-02-14 12:50:00 +00:00
974cb2b386 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>
2016-02-14 12:40:08 +00:00
0acc01923b 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>
2016-02-14 12:40:08 +00:00
b7f6303e3c 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>
2016-02-14 12:40:08 +00:00
50c354e39c 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>
2016-02-14 12:40:07 +00:00
cb143a9a63 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>
2016-02-14 12:40:07 +00:00
cd6e8db177 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>
2016-02-14 12:40:07 +00:00
4afc8550c6 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>
2016-02-14 12:40:06 +00:00
7178c7c009 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>
2016-02-14 12:40:06 +00:00
e6feb5b10c 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>
2016-02-14 12:40:06 +00:00
5901fc5c12 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>
2016-02-14 12:40:05 +00:00
0f57ecbb37 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>
2016-02-14 12:40:05 +00:00
Mark Tompsett
f347754d52 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>
2016-02-14 12:40:05 +00:00
Mark Tompsett
55445457c9 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>
2016-02-14 12:40:05 +00:00
00c89d915b 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>
2016-02-14 12:40:04 +00:00
Jesse Weaver
f363358690 Bug 15411: DBrev 3.23.000.019 (part 2)
Update Koha.pm and updatedatabase.pl.

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-02-12 17:00:52 -07:00
Jesse Weaver
bc9613bf6f Bug 15411: DBrev 3.23.000.019
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-02-12 16:59:26 -07:00
Aleisha
81c9770f28 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>
2016-02-12 16:53:17 -07:00
Aleisha
84e8cafca5 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>
2016-02-12 16:53:17 -07:00
Jesse Weaver
5fec490093 Bug 15446 - DBrev 3.23.000.018
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-02-12 12:43:32 -07:00
7ef9c1b6f5 Bug 15446 [QA Followup] - Update new classes
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-02-12 12:35:57 -07:00
7cb660c665 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>
2016-02-12 12:35:57 -07:00
1427cacfe7 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>
2016-02-12 12:35:57 -07:00
de3289506d 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>
2016-02-12 12:35:57 -07:00
bd7e79940d 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>
2016-02-12 12:35:56 -07:00
71d4942c30 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
2016-02-11 19:42:31 +00:00
16e55c1f32 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
2016-02-11 19:42:31 +00:00
a8942c2884 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 e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

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

This reverts commit d6475a111f.

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

This reverts commit dd98c9df92.

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

This reverts commit a065b243fe.

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

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

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

This reverts commit 0e98662b10.

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

This reverts commit fc2fb605e5.

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

This reverts commit bc308fdd9c.

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

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

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

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

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

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

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

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

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

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

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

This reverts commit 21ae62b253.

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

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

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

This reverts commit 00eff140b3.

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

This reverts commit 7db851ff03.

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

This reverts commit 49a3738b8d.

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

This reverts commit cedaa0e23e.

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

This reverts commit 01b38d3b13.

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00
Marc Véron
59fc325310 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
2016-02-04 00:14:43 +00:00
Julian Maurice
5ef5fb5617 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
2016-02-03 23:03:33 +00:00
6d24219976 Bug 15687 [QA Followup] - Tidy sub to remove tab characters
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-02-03 23:01:07 +00:00
Julian Maurice
70112cfb81 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>
2016-02-03 23:01:07 +00:00