Bug 9971 - Plugins system is broken!

Trying to run a plugin results in the following error:

Software error:

Undefined subroutine &Koha::Plugins::Base::get_template_and_user called
at /home/koha/kohaclone/Koha/Plugins/Base.pm line 108.

The is caused by the change from 'use C4::Auth' to 'require C4::Auth'
which does not export get_template_and_user.

Test Plan:
1) Install the KitchenSink plugin
2) Try to run the report, tool or configuration for the plugin
3) Note the error
4) Apply the patch
5) Try again

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9971' into 3.12-master
Bug 9535 - Patron card creator "Remove duplicates" function doesn't work

This bug was due to a difference in field names used in the item data
for items versus patrons. This patch adds a ternary to discern between
the two.

To test:

Before applying patch:

1. Create a batch of patroncards with one duplicate.
2. Run the de-duplication on the batch.
3. Note that all patrons beyond the first in the batch are now
   deleted.

After applying patch:
4. Repeat steps 1-2.
5. Note that only the duplicate patron is removed.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested successfully with both patron card batches and label batches.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Add indentation for readability
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9535' into 3.12-master
Bug 9970 - Add datepicker default configuration to OPAC patron entry form

The datepicker on the OPAC patron entry/update form
(opac-memberentry.pl) doesn't show a calendar icon. This is because
although there is in-page JS to trigger the widget, the page doesn't
include the file which sets some widget defaults, including the path to
the calendar icon and the translatable strings for calendar labels.

This patch simply adds calendar.inc to the template.

To test, load the patron entry/update form (click "personal details" for
an existing patron or a start new patron registration). The date of
birth entry field should show a calendar icon.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Test plan works as described. Looks much better.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9970' into 3.12-master
Bug 9877 - Use DataTables on funds administration page

Replace the tablesorter plugin with the DataTables plugin on the funds
administration page.

To test, open the funds administration page (Administration ->
Funds). Confirm that table sorting, paging, and searching works
correctly.

Note that the table is sorted only when hierarchical display of parent
and child funds is not enabled. When the hierarchicial display is
enabled the table sorter is not triggered.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>

Post-QA revision adds handling for empty table: "No funds" row must have
same number of cells as the rest of the table (including hidden cell);

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 9877: Followup: FIX if the table is empty.

If there is no data, we don't display the table.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9877' into 3.12-master
Bug 9683: Allow disable rewrite apache mod

In Apache config koha-httpd.conf, URL-rewriting is enabled and does not
allow to disable mod_rewrite. Also, first rewriting rule
"RewriteRule (.+) $1?%1%2 [N,R,NE]" is enabled by default. This rule
rewrites nearly every URL. I propose to comment it in sources so that is
must be intentionally enabled.

This patch sets rewriting options into a conditional tag.

Test plan :
Test OPAC and intranet with and without mod_rewrite activated.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
The new Apache configuration seems to work fine (or at least as "fine"
as Apache gets) both with and without mod_rewrite enabled.
Merge branch 'bug_9683' into 3.12-master
bug 4862 - Change label of Browse by subject or author to Authority search

Replicate:
Load the OPAC
You should see "Browse by Subject or Author right below the search box

To test:
Apply patch
Load the OPAC
You should see "Authority search" where "Browse by Subject or Author" was .

Signed-off-by: Mason James <mtj@kohaaloha.com>
Amended patch: change strings in opac-authorities-home.tt

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_4862' into 3.12-master
Bug 9981: Handle sort1 field when duplicating patron

It is noted in Bug 5432 that during a duplicate operation one field,
'Sort1' does not automatically clear when the cursor moves into it. This
patch corrects this.

Edit a patron record to have data in the Sort1 and Sort2 fields. Perform
a duplicate operation on this patron and confirm that the Sort1 and
Sort2 fields show the information from the original patron record. When
you click on each field the contents should disappear.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9981' into 3.12-master