Bug 11061: remove unused routine Koha::Calendar::_mock_init

Bug 9209 removes the only occurrence to Koha::Calendar::_mock_init
The routine can be removed.

Test plan:
prove t/Calendar.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I left that routine because I planned to do a follow-up for that so the
Calendar patch series was pushed soon. Nice catch Jonathan, works as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, t and xt

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11238: contruct links to the appropriate manual version dynamically

This patch uses the version number of the Koha database to
dynamically generate links from help to the appropriate version
of the manual.

Test plan (for 3.15 branch):
- Open a help page
- Verify the manual link is correct (point to 3.14 manual)
- change the version in mysql:
update systempreferences set value="3.1600000" where variable="version";
- Verify the manual link now points to the future 3.16 manual.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Tested on top of Bug 10671
On master (BD version 3.13.xxx) help links point to 3.12 manual
Changing version to 3.14/15 points to 3.14 manual
Changing version to 3.16 points to the future :)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11146: Show a go back link on no permission page

When a user does not have permissions for a page or module, the
authentication page is displayed with message

  "Error: You do not have permission to access this page.".

Most librarians uses the "previous page" button of their browser to
come back on the page they were before trying to get to the
non-permitted page.

This patch adds a button to help coming back to previous page.
It also changes the "Click to log out" link as a button.

Test plan :
- Define a user with staff permissions but no permission on tools module
- Login with this user
=> You get to intranet home page
- Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl
=> You get a page with a red error message and 2 buttons "Previous page"
   and "Log out"
- Click on "Previous page"
=> Go get to intranet home page
- Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl
- Click on "Log out" button
=> You are logged-out and get to authentication page : cgi-bin/koha/mainpage.pl?logout.x=1

Signed-off-by: Garming Sam <garming@catalyst.net.nz>

Works as intended.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7491: improve description of the item-level_itypes syspref

Adding some text to the pref description referring to OPAC display.

Test plan:
Look at the new description in Cataloging preferences.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11222: fix crash that can occur in search for items to add to label batch

This patch fixes a regression on label-item-search.pl introduced by
the patch for bug 9239 where searching for items to add to a label
batch fails with an error if QueryParser is not enabled and you use
the "Added on or before date" search option.

Test plan:

0) Set "UseQueryParser" to "do not try"
1) Start with an installation with bibliografic data and items
   information.
2) Check that in items there are values inside Accession Date

Without the patch:
a) Go in Home› Tools› Labels  and click on 'New batch'
b) Click on 'Add Item(s)'
c) Try to select items with option "Added on or before date"
d) You will receive an error

With the patch:
Try steps a),b), and c)
Now you don't receive an error and you can select items

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

Added a description of the problem and copied the test plan from the bug
report, with the addition of the information that QueryParser must be
off to confirm and test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11125: Correct display for patron messaging preferences on OPAC

 To test :
 1) Remove 'sms' from message_transport_types table
 2) Go on OPAC "My messaging" tab => table columns are out of alignment with table heading
 3) Apply patch => table is correctly displaid

Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6435: Add daemon mode to rebuild_zebra.pl

This change adds code to check the zebraqueue table with a cheap SQL query
and a daemon loop that checks for new entries and processes them incrementally
before sleeping for a controllable number of seconds.  The default is 5 seconds
which provides a near realtime search index update.  This is desirable particularly
for libraries that are doing active catalogue updating.  The query is adjusted
based on whether -a, -b, or -a -b are specified.

Help text updated.  Tested against a live 3.12 system.

Note that this fix will benefit from the fix to lack of locking (bug 11078)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6435: (follow-up) rebuild_zebra -daemon option now smarter

Based on feedback, make daemon mode imply -z -a -b and abort
on startup if flags incompatible with an incremental update daemon
are used.  Update documentation to match.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6435: (follow-up) make -daemon really imply -a and -b

This patch follows up on the previous patch by moving the
check for whether authority and/or biblio indexing have been
specified so that -daemon has a chance to set those modes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11040: Add CircAutoPrintQuickSlip option to print regular slip

This patch adds a third option to the CircAutoPrintQuickSlip system
preference.  The three options are now:

* print quick slip
* print regular slip
* clear the screen

Test plan:
1.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

2.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

3.  Apply the patch
    Update the database using UpdateDatabase.pl

4.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

5.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

6.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

7.  Reload the database using sysprefs.sql
    Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

8.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

9.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

10.  Verify that the Checkout Help includes information about printing Slips.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11040: DBRev 3.15.00.001

Signed-off-by: Galen Charlton <gmc@esilibrary.com>