koha.git
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>
8 years agoBug 8753 - Use Koha::Borrowers instead of C4::Members
mxbeaulieu [Fri, 24 Jul 2015 20:16:03 +0000 (16:16 -0400)]
Bug 8753 - Use Koha::Borrowers instead of C4::Members

Use the new library to search for borrowers.
Changed how the $borrower variable is used since it is now a Koha::Borrower object.

Removed the $protocol parameter from the generated link. It should be included in the OPACBaseURL syspref.

modified:   C4/Passwordrecovery.pm
modified:   opac/opac-password-recovery.pl

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - Followup - change value text on syspref
Liz Rea [Wed, 13 May 2015 22:31:01 +0000 (10:31 +1200)]
Bug 8753 - Followup - change value text on syspref

Followup changes text from "The user can reset | can not reset their password on OPAC" to "Library users are allowed | not allowed to recover their password via e-mail in the OPAC"

This change more clearly differentiates the purpose of this new preference from OpacPasswordChange.

Bug 8753 - followup - update text for link to match common UI paradigms, fixes OpacPublic disabled view

Also corrects OpacNav being included on the reset page on private catalogues.

Updated the link for forgotten passwords to more closely match common UI paradigms, i.e. Facebook and Twitter

To test:
apply all patches, link should now be the less verbose "Forgot your password?"
disable OpacPublic, anything in opacnav should not appear (you may need to add something to opacnav to test properly)

Bug 8753 - [followup] fix the title on opac-password-recovery.tt

The title stanza was missing a <title></title> around it, causing the extra text to appear.

To test, apply all patches and make sure it looks ok and there is no extra text at the top or bottom of the page.

Bug 8753 - [followup} Correcting spelling mistakes

Make sure it all still works

Bug 8753 - [followup] fix error when no information is provided

To test:

All normal checks plus make sure that a nice error is displayed when no data is provided.

fixing the deprecated thing

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 8753 - Add forgot password link to OPAC
Maxime Beaulieu [Wed, 11 Mar 2015 17:52:59 +0000 (13:52 -0400)]
Bug 8753 - Add forgot password link to OPAC

 I've addressed a lot of Liz Rea's points.

1.  I have moved the code from updatedatabase.pl and kohastructure.sql to a file in the atomicupdates directory.
1a. The feature is now off by default when the atomicupdate is run.

2.  The password reset link is now visible on the home page, in the modal box and on opac-user.pl .

3.  The password recovery pages now use bootstrap markup.

4.  I am unsure here. I see "New Password:" and "Confirm new password:".

5.  This should still work :).

6.  I could not reproduce.

7.  I have added the userid field.
    You can now reset the password by submitting either your useid or email address.
    Both fields can be filled, but the email address must be one of the borrower's (email, emailpro or b_email).
    When entering only the email address and two borrowers use that same address, the system tells the user to try with another address or to specify his userid.

8.  The text is in the atomicupdate file. Have at it, anyone.

Concerning the email. It is inconvenient for the use to have to wait X minutes for the message queue the be processed.
Maybe we could add a sub in Letters.pm that:
    Takes the same argments as EnqueueLetter
    Sends the letter.
    Saves the letter in the message queue with a 'sent' status.

 TEST PLAN:

Setup)
    1) apply the patch
    2) go to system preferences OPAC>>Privacy and set 'OpacResetPassword' to ON.
    2b) make sure that OpacPasswordChange is also ON.
A)
    1) refresh front page, click on 'Forgot your password' and enter a VALID address
    1b) Also try an INVALID address (valid yet not in your koha db).  An error message will show up.
    2) An email should be received at that address with a link.
    3) Follow the link in the mail to fill the new password.
    Until a satisfactory new password is entered, the old password is not reset.
    4) Go to main page try the new password.
B)
    1) Repeat the password reset, this time use the userid (username) field.
    2) Try to reset the password using a userid and an email not linked to the account. An error appears.
    3) Make sure the borrower has many available email addresses.
    4) For each email, reset the password using both the userid and the email. The link should be sent to the specified address
C)
    1) Make sure two borrowers use the same email.
    2) Repeat the reset procedure in test case A). An error message appears

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

 Author:    Maxime Beaulieu <maxime.beaulieu@inlibro.com>

Followed test plan. Works as described.
Signed-off-by: Marc Veron <veron@veron.ch>
New sign-off after testing all patches together
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years ago Bug 1983: Checkout: Hold repquest when checking out an item already on loan or reserved
Marc Véron [Sat, 26 Dec 2015 11:28:57 +0000 (12:28 +0100)]
 Bug 1983: Checkout: Hold repquest when checking out an item already on loan or reserved

This patch allows to put a hold on an item that is already checked out or reserved.

To test:

- Check out an item A
- Put a hold on an item B
- Verify that the staff user has permission to put holds
- Check out item A to a patron X
- Try to checkout item A to a patron Y
- Verify that you see underneath the buttons for Checkin/Checkout a link
  with following text: "Click here to place hold for [Patron X' name]"
- Verify that the link is stylable (div class circ-scheckoutplacehold)
- Verify that the link takes you to the page to place a hold on this biblio
  for patron Y
- Do the same for item B and verify that it works for reserved items as well.
- Repeat steps above for a patron who has restrictions, verify that the link
  does not appear
- Log in with a staff member who has no permission to place holds
- Repeat steps above for a patron without restrictions, verify that the link
  does not appear.

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>
8 years ago Bug 7683: Relabel "acquired date" and "removed date"
Julian Maurice [Mon, 9 Nov 2015 14:45:31 +0000 (15:45 +0100)]
 Bug 7683: Relabel "acquired date" and "removed date"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 7683: Catalog statistics wizard: QA fixes
Julian Maurice [Mon, 24 Aug 2015 10:20:17 +0000 (12:20 +0200)]
 Bug 7683: Catalog statistics wizard: QA fixes

1/ Do not allow invalid date ranges (from > to) (datepicker only)
2/ Relabel "From:" to "From" for consistency
3/ Fix MIME type for CSV
4/ Use Koha::DateUtils instead of C4::Dates
5/ Use placeholders in SQL query

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 7683: Fix a shift in date filter indexes
Julian Maurice [Thu, 6 Feb 2014 13:44:56 +0000 (14:44 +0100)]
 Bug 7683: Fix a shift in date filter indexes

Date filter indexes are 13, 14, 15, 16,
not 14, 15, 16, 17

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no koha-qa errors (some message for the deleted file)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 7683: Remove dead code about dewey and lccn filters
Julian Maurice [Thu, 6 Feb 2014 13:38:51 +0000 (14:38 +0100)]
 Bug 7683: Remove dead code about dewey and lccn filters

$hasdewey and $haslccn were hardcoded to 0

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 7683: Cataloguing statistics wizard improvements
Julian Maurice [Mon, 27 Feb 2012 16:11:29 +0000 (17:11 +0100)]
 Bug 7683: Cataloguing statistics wizard improvements

- Add 3 options for cells value
  - Titles count "COUNT (biblionumber)"
  - Items count "COUNT (itemnumber)" (current behavior)
  - Deleted items count "COUNT (deleteditems.itemnumber)"

- Add to selectable rows, colums and filters:
  - items.notforloan
  - items.materials

  For each of these fields, retrieve the label in the default cataloging
  framework.
  If no MARC field is mapped to the field in question, it does not show
  this line in the wizard.
  If the MARC field is associated with a list of authorized values, it
  displays a dropdown list for the filter, otherwise it displays a text
  field.

- Add to selectable rows, columns and filters:
  - items.dateaccessioned (creation date)
  - deleteditems.timestamp (deletion date) (Only if the third option (eg
    count deleted items) is selected)

- Add unit tests for GetMarcSubfieldStructureFromKohaField

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 11081: (followup) Add license information
Bernardo Gonzalez Kriegel [Mon, 18 May 2015 10:56:52 +0000 (07:56 -0300)]
 Bug 11081: (followup) Add license information

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 11081: Port Koha::Contrib::Tamil indexer into Koha code base
Frédéric Demians [Sun, 20 Oct 2013 06:44:55 +0000 (08:44 +0200)]
 Bug 11081: Port Koha::Contrib::Tamil indexer into Koha code base

Add two scripts for indexing: koha-index and koha-index-daemon.

Documentation:

  perldoc koha-index
  perldoc koha-index-daemon

New dependencies:

  MooseX::Getopt
  MooseX::RW
  AnyEvent::Processor

Available as a Debian package: libmoosex-getopt-perl

Test plan:

- Apply the patch
- Install dependencies, if necessary
- Reindex a whole biblio catalog:
  koha-index --verbose
- Reindex a whole authorities catalog:
  koha-index --source authority --verbose
- Modify 1 biblio record, and index it:
  koha-index --select queue
- Modifiy 1 authority record, and index it:
  koha-index --select queue --source authority
- Run indexing daemon, with a 15s timeout:
  koha-index-daemon --timeout 15
- Modify a biblio record: wait 15s, and see
- Modify an authority record: wait 15s, and see

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, followed test plan without problems

One comment: perhaps an option for koha-index-daemon
to work quietly, without printing information.

No koha-qa errors, but new files don't have license,
fixed in followup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 11280 - Change Withdrawn toggle to drop down selection of authorized values
Owen Leonard [Mon, 7 Dec 2015 19:41:29 +0000 (14:41 -0500)]
 Bug 11280 - Change Withdrawn toggle to drop down selection of authorized values

'Withdrawn' is an authorised value just like 'Lost' and 'Damaged,' so
the item detail screen should offer the same means of selecting one of
multiple values.

This patch re-uses the same template markup and code 'Lost' and 'Damage'
use to make it possible to select a specific withdrawn value.

To test you should have multiple values entered for the authorised value
category 'WITHDRAWN'.

1. Apply the patch and locate any record in the catalog.
2. From the detail screen, click the barcode in the items table to go to
   the item detail page.
3. Confirm that there is a dropdown list of choices for 'Withdrawn
   status.'
4. Try both setting and unsetting various withdrawn statuses.
5. Confirm that setting Lost or Damaged statuses.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13143 - Detect if the password is in a pipe
Liz Rea [Tue, 7 Jul 2015 01:06:36 +0000 (13:06 +1200)]
 Bug 13143 - Detect if the password is in a pipe

1. cd kohaclone/debian/scripts
2. sudo koha-passwd instance | cat
   Output should be password only
3. sudo koha-passwd instance
   Output should be "Password for $instance is: $password"

Does this get at what you were wanting, Robin?

NOTE:
$ cd ~
$ sudo mkdir /etc/koha
$ sudo mkdir /etc/koha/sites
$ sudo mkdir /etc/koha/sites/library
$ sudo ln -s ~/koha-dev/etc/koha-conf.xml /etc/koha/sites/library/koha-conf.xml
$ sudo mkdir /usr/share/koha
$ sudo ln -s ~/kohaclone/debian/scripts /usr/share/koha/bin

This will fake out your system enough to get koha-passwd to run in your git
system. Since you are using your git system, no need for the sudo's in
steps 2 & 3. And no need to roll a custom build to test it.

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>
8 years ago Bug 13143: Followup - Correct the pause message
Mark Tompsett [Wed, 26 Nov 2014 21:23:31 +0000 (16:23 -0500)]
 Bug 13143: Followup - Correct the pause message

'read anykey' actually requires enter under sh.
This patch changes the string from:
    'Press any key to clear the screen...'
to
    'Press enter to clear the screen...'

TEST PLAN
---------
1) Apply the first two patches
2) Trigger the script.
2) Press 'q' or anything other than enter when prompted.
   --- You could type a whole sentence! Oops!
3) Press enter.
4) Apply this patch
5) Trigger the script.
6) Be happy that you aren't told any key will work.
7) run koha qa tools

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
http://bugs.koha-community.org/show_bug.cgi?id=13141

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>
8 years ago Bug 13143 - follow up - usability improvements
Liz Rea [Fri, 31 Oct 2014 03:34:31 +0000 (16:34 +1300)]
 Bug 13143 - follow up - usability improvements

* makes sure output is not on the line with the prompt
* adds ability to clear screen after password display

Same test plan as for original bug.

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>
8 years ago Bug 13143 - Add a tool to show a Koha's password
Mason James [Fri, 24 Oct 2014 18:03:31 +0000 (07:03 +1300)]
 Bug 13143 - Add a tool to show a Koha's password

to test...

1/ run without any args, and get some help
 # koha-passwd
Displays a Koha instance's password.

Usage: /usr/sbin/koha-passwd instancename1 instancename2...

Missing instance name...

2/ run with a bad instance, get an error
 # koha-passwd xxxxx
Unknown instance xxxxx

3/ run with a correct instance, get a password
 # koha-passwd koha1
foofoo69

4/ run with many instances, get many passwords
 # koha-passwd koha1 koha2 koha3
foofoo69
foofoo68
foofoo67

Signed-off-by: Mason James <mtj@kohaaloha.com>
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>
8 years ago Bug 13642: (followup) OAI-DC checked by default in OPAC modal
Hector Castro [Thu, 24 Dec 2015 00:57:56 +0000 (18:57 -0600)]
 Bug 13642: (followup) OAI-DC checked by default in OPAC modal

-Fixing default option checked for OAI-DC in OPAC modal
-Move OPAC modal to opac-detail-sidebar.inc to display in MARC view
 and ISBD view
This follow-up fix the QA comment in comment 149

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Above issue fixed & usable also in MARC/ISBD view

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13642 - Remove MARC::Crosswalk::DublinCore from Koha
Hector Castro [Thu, 12 Nov 2015 17:50:36 +0000 (11:50 -0600)]
 Bug 13642 - Remove MARC::Crosswalk::DublinCore from Koha

To test:

1) git grep "MARC::Crosswalk::DublinCore"

C4/Installer/PerlDependencies.pm:    'MARC::Crosswalk::DublinCore' => {
INSTALL.fedora7:MARC::Crosswalk::DublinCore

2) git grep "libmarc-crosswalk-dublincore-perl"

debian/control: libmarc-crosswalk-dublincore-perl,
debian/control: libmarc-crosswalk-dublincore-perl,
install_misc/debian.packages:libmarc-crosswalk-dublincore-perl install
install_misc/ubuntu.10.04.packages:libmarc-crosswalk-dublincore-perl    install
install_misc/ubuntu.12.04.packages:libmarc-crosswalk-dublincore-perl    install
install_misc/ubuntu.packages:libmarc-crosswalk-dublincore-perl  install

3) Repeat step 1 and 2

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Ripping out any mention to MARC::Crosswalk::DublinCore can't hurt.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13642 - Add Unit test for C4::Record::marc2dcxml
Hector Castro [Mon, 9 Nov 2015 23:17:28 +0000 (17:17 -0600)]
 Bug 13642 - Add Unit test for C4::Record::marc2dcxml

Add Unit test for C4::Record::marc2dcxml

To test:
prove t/db_dependent/Record.t
prove t/db_dependent/Record/Record.t

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13642 - Changes LESS opac.less > to opac.css
Hector Castro [Mon, 9 Nov 2015 16:31:10 +0000 (10:31 -0600)]
 Bug 13642 - Changes LESS opac.less > to opac.css

Changes LESS opac.less > to opac.css

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13642 - Adding new features for Dublin Core metadata
Hector Castro [Mon, 9 Nov 2015 05:22:47 +0000 (23:22 -0600)]
 Bug 13642 - Adding new features for Dublin Core metadata

When Koha export a bibliographic record to DC, makes it in XML format.
This XML not follows the DC-XML recommendations as should be: elements
in uppercase eg. dc:Date, dc:Creator, section 4.2, recommendation 4
explain that "The property names for the 15 DC elements should be all
lower-case." eg. dc:date, dc:creator" and section "4.3 Example - a
simple DC record", xsi:schemaLocation="http://example.org/myapp/
http://example.org/myapp/schema.xsd" schema does not exist.

NOTE: This new feature implement the XSLT transformation for OAI-DC,
SRW-DC and RDF-DC

Test plan
---------------
1) Download Dublin Core file from record detail page. Open up the file,
   and make sure that the document not follows the DC-XML
   recommendations as should be.
2) Apply patch.
3) Go to whichever bib record in OPAC or staff and click on Save >
   Dublin Core.  A modal will display, prove all options.
4) Change the system preference 'Opac ExportOptions' by enabling and
   disabling Dublin Core and try to download a record.
5) Try several bibliographic records in any format (book, magazine, DVD,
   etc.) to confirm that properly exported.
6) Test with all marc flavours.

Sponsored-by: Universidad de El Salvador
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 14310 [QA Follow] - Remove FIXME, add explanation comment instead
Kyle M Hall [Tue, 19 Jan 2016 14:16:22 +0000 (14:16 +0000)]
 Bug 14310 [QA Follow] - Remove FIXME, add explanation comment instead

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 14310 [QA Followup] - Adapt existing code to use new methods
Kyle M Hall [Tue, 19 Jan 2016 12:18:40 +0000 (12:18 +0000)]
 Bug 14310 [QA Followup] - Adapt existing code to use new methods

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>