Ian Walls [Wed, 21 Mar 2012 20:03:32 +0000 (16:03 -0400)]
Bug 5549 Followup: fix suspension in days
ISO dates were being compared with DateTime objects, and DateTime::Durations
with integers. This patch reimplements the _FixFineDaysOnReturn subroutine
to use the new hourly loans functionality.
Also moves date formatting of patron debar date out of circ/returns.pl and into
KohaDates on the template
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Colin Campbell [Tue, 5 Jul 2011 15:44:16 +0000 (16:44 +0100)]
Bug 5549 : CalcFine was corrupting due date
Clone the passed duedate as the addition of days was
corrupting it in calling context causing new account recs
to be written rather than updating the existing
Colin Campbell [Thu, 23 Jun 2011 10:35:35 +0000 (11:35 +0100)]
Bug 5549 : Don't confuse the users with an irrelevant time
If the book is due at 23:59 the due time is irrelevant
and potentially confusing to the user add a DateUtils
routine that strips that off the returned display date
Colin Campbell [Wed, 15 Jun 2011 10:18:38 +0000 (11:18 +0100)]
Bug 5549 : Add Tests For Koha::DateUtils
Add testscript for DateUtils
Add a parameter to override system pref to output_pref not for
use in calling software (its superfluous) but to enable testing
of call with different settings
Colin Campbell [Tue, 24 May 2011 14:00:33 +0000 (15:00 +0100)]
Bug 5549 : Add a timezone object to C4::Context
Will be required by rolling loans to get correct times
NB the setting of the TZ in mysql has not been changed as
this appears to rely on $ENV{TZ} being undefined
While typing an authority, will automatically propose authorities (similar to
autocompletion for patron search if activated)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested searching for authorities with and without autocomplete. Note that
this is most useful when used in the "Main entry" box instead of the
"Main entry ($a only)" box. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Corrected tabs to spaces in auth-finder-search.inc while resolving merge
conflict.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Jonathan Druart [Thu, 8 Mar 2012 11:41:13 +0000 (12:41 +0100)]
Bug 7477: Followup: Fix perlcritic issues
Signed-off-by: Srdjan Jankovic <srdjan@catalyst.net.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
An existing holiday in a branch is not deleted when the branch is overwritten:
* branch B, set today as closed
* switch to branch A, where today is not closed
* copy holidays to branch B
* today is still closed for branch B
Owen Leonard [Wed, 7 Mar 2012 19:06:45 +0000 (14:06 -0500)]
Bug 7668 - Improve navigation and toolbar options in guided reports
Creating new include, reports-toolbar.inc for presenting "action"
options to the user, in contrast with "view" options in the left-
hand navigation menu.
In the toolbar: New (guided report, SQL report), Edit, Run.
The presence of the toolbar allows the user to access functions
more flexibly: Getting directly to 'edit' or 'run' from the 'view'
page for instance.
Modifications to guided_reports.pl pass report id and name to
the template for clarity and for the purpose of enabling the
edit/run buttons.
To test: Apply the patch and go through the process of creating
a new saved SQL report. Note that the toolbar is present and
the buttons are functional at appropriate times.
New and Edit options should only be displayed if the user has
permission to create reports. Test with a user who does not
have create permission to confirm.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Srdjan Jankovic [Fri, 27 Jan 2012 03:59:27 +0000 (16:59 +1300)]
bug_7140: Added item description to complement icon to search result and biblio detail pages
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This seems like a very big improvement, especially for people using screen
readers. I agree that the change to C4::Search is required.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Robin Sheat [Thu, 9 Jun 2011 03:11:23 +0000 (15:11 +1200)]
Bug 6296: allow users to be authenticated by SSL client certs
This adds a new syspref: AllowPKIAuth. It can have one of three states:
* None
* Common Name
* emailAddress
If a) this is set to something that's not "None", and b) the webserver
is passing SSL client cert details on to Koha, then the relevant field
in the user's certificate will be matched up against the field in the
database and they will be automatically logged in. This is used as a
secure form of single sign-on in some organisations.
The "Common Name" field is matched up against the userid, while
"emailAddress" is matched against the primary email.
This is an example of what might go in the Apache configuration for the
virtual host:
The last line ensures that the required details are
passed to Koha.
To test the PKI authentication, use the following curl command:
curl -k --cert client.crt --key client.key https://URL/
(look through the output to find the "Welcome," line to indicate that a user
has been authenticated or the "Log in to Your Account" to indicate that a
user has not been authenticated)
To create the certificates needed for the above command, the following series
of commands will work:
# Create the CA Key and Certificate for signing Client Certs
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# This is the ca.crt file that the Apache config needs to know about,
# so put the file at /etc/apache2/ssl/test/ca.crt
# Create the Server Key, CSR, and Certificate
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
# We're self signing our own server cert here. This is a no-no in
# production.
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key \
-set_serial 01 -out server.crt
# Create the Client Key and CSR
openssl genrsa -des3 -out client.key 1024
openssl req -new -key client.key -out client.csr
# Sign the client certificate with our CA cert. Unlike signing our own
# server cert, this is what we want to do.
openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key \
-set_serial 02 -out client.crt
openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12
# In theory we can install this client.p12 file in Firefox or Chrome, but
# the exact steps for doing so are unclear, and outside the scope of this
# patch
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested with Common Name and E-mail authentication, as well as with PKI
authentication disabled. Regular logins continue to work in all cases when
SSL authentication is set to optional on the server.
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA comment: synchronized updatedatabase.pl version of syspref with sysprefs.sql
version, to avoid divergent databases between new and upgrading users.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
This patch fixes another sysprefs problem -
Syck parser (line 300, column -1): syntax error at /usr/lib/perl5/YAML/Syck.pm line 76, <$fh> line 1.
when clicking local use. I could not verify that it fixed translations, but fixing the local use prefs is important too, so I'm signing off.
Ian Walls [Sat, 10 Mar 2012 14:03:20 +0000 (09:03 -0500)]
Bug 5698: Add date picker option to SQL Runtime Parameters
Adds a date picker for SQL reports with the 'date' authorised_value. Updates help
documentation for this new feature, as well.
To test:
1. Create a new report with two date parameters, using the syntax:
<<Label for this selection of date|date>>
2. Run the report
3. Select dates
4. The SQL generated should format the dates properly in ISO, and keep track of which
date is which
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Owen Leonard [Thu, 8 Mar 2012 13:53:45 +0000 (08:53 -0500)]
Bug 7670 - make required fields red
Adding "required" style and "Required" note to additem fields,
consistent with the way required fields are displayed
on the add patron form.
This patch also corrects an error in the client-side validation
script which misidentified which fields were required. Leaving
a required field empty should result in an alert and the missing
field being highlighted in yellow.
To test, open the add item form on a record which uses
a framework in which one or more item fields are required.
Required fields should be labeled in red and appended with a
"Required" note.
Submit the form while some required fields are empty. You should
see a javascript alert. The empty mandatory fields should have
a yellow background.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Works - passes tests.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Mon, 5 Mar 2012 19:47:51 +0000 (14:47 -0500)]
Bug 7644 - Invalid markup in staff client language chooser
This patch removes invalid markup from the language chooser
in the intranet. It also copies the markup and style of
the staff client include to the OPAC so the two are
more consistent. I hope that will make future changes
and debugging a little easier.
I believe this patch also fixes Bug 7366, "Language chooser
display problems."
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes bug 7366, but there is still a difference between staff
and OPAC.
Installed languages: en, en-NZ, de-DE, fr-FR
Activated langauges: en, en-NZ, fr-FR
OPC shows English, staff shows en-NZ as label for the list.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Removing 'use C4::Branch' in favour of a subroutine-specific 'require C4::Branch'
causes the GetBranchName subroutine to return an error, as it's not defined
in C4::Items. Adding "C4::Branch::" scoping fixes the error, which is what's done here.
To confirm problem:
1. Attempt to run bulkmarcimport.pl before applying the patch. You should get
ERROR: Adding items to bib 435 failed: Undefined subroutine &C4::Items::GetBranchName
called at /home/sekjal/kohaclone/C4/Items.pm line 656, <GEN13> line 435.
To test:
2. apply patch
3. run bulkmarcimport again. Error should disappear.
Signed-off-by: Ian Walls <koha.sekjal@gmail.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Note that this problem only appears when importing records with item (952)
fields.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Tue, 27 Dec 2011 16:18:34 +0000 (11:18 -0500)]
Bug 7031 Follow-up, More options for AdvancedSearchTypes
This follow-up patch corrects some markup errors and removes some
markup which I think is superfluous:
- Using template FILTER command to remove invalid punctuation from
ID attributes (to quiet the HTML validator)
- Removing <fieldset> since options are bordered by the tab box now
- Correcting the conditional which controls the table markup
to prevent extra/missing </tr>
- Adding missing ID attribute in the OPAC template
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>