Galen Charlton [Fri, 22 May 2009 00:10:50 +0000 (19:10 -0500)]
bug 2001, 2432: improve unAPI implementation
Improves Koha's unAPI support as follows:
* The implementation no longer depends on there being
an accessible Zebra or SRW server. Instead, responses
are created by running the bib MARCXML through local
stylesheets.
* unAPI now works for all bibs, not just ones that have
an ISBN. The ID format is changed from koha:isbn:ISBN
to koha:biblionumber:BIBNUM.
* unAPI now correctly advertises the formats it supports.
* This implementation now passes validation testing at
http://validator.unapi.info/ .
* MODS3 support now works correctly. As a consequence, this
patch fixes bug 2432 (Zotero support when using the XSLT
OPAC stylesheets).
TODO: as additonal XSLT stylesheets are created to convert
UNIMARC bibs to additional formats, the stylesheet map
in opac/unapi should be updated.
koha [Wed, 20 May 2009 15:36:00 +0000 (15:36 +0000)]
Updated create_koc_db.pl to output SQlite2 files compatible with the Offline Circulation system, rather than the SQlite3 files that required post-processing.
[RM Note: patch by Kyle Hall <kyle.m.hall@gmail.com>]
Galen Charlton [Thu, 21 May 2009 20:03:57 +0000 (15:03 -0500)]
bug 2897: fix English sample notices
Same as Joe's prior 2897 patch, but applied to the English
sample_notices.sql - due to a Git merge and rename detection
oddity, his original submitted patch was applied to the French
sample_notices.sql. Since the two files are
currently identical, no problem in the end.
Joe Atzberger [Thu, 12 Feb 2009 20:49:33 +0000 (14:49 -0600)]
Bug 2897 - sample notices include bogus values
items.content is invalid for anything but overdue notices. It is
not processed by advance_notices.pl for DUE and PREDUE. Also, the
odd greeting "Dear firstname title" is standardized to match the
other messages' "Dear firstname surname".
Michael Hafen [Wed, 29 Oct 2008 19:48:04 +0000 (13:48 -0600)]
in Auth_with_ldap.pm try binding with user password or compare
This changes the checkpw code in Auth_with_ldap. Along with comparing
the user entered password against the directory attibute userPassword
you can try to bind with the users dn and password.
This is controlled by the option auth_by_bind, which, if set, causes
this code to try binding instead of comparing.
this patch fix the searchorder function, and add to the SQL query a "AND biblionumber" statement if a biblionumber is speficied.
Sometimes C4::Acquisitions::searchorder() find more than one result, so the user is looping to the same page to choose the great record, adding a contraint to biblionumber allows to be more strict.
Joe Atzberger [Wed, 20 May 2009 21:55:09 +0000 (16:55 -0500)]
Cleanup and enhance bookcount.pl and .tmpl
Eliminated bug with date handling outputting an English string.
Row striping added. Highlight for "my branch" row added.
GetBranchesLoop used instead of recreating data structure, so we get the
benefit of branches being sorted (by display name).
Joe Atzberger [Wed, 20 May 2009 19:39:03 +0000 (14:39 -0500)]
Add onlymine helper function.
This should allow scripts to use GetBranchesLoop without having to reproduce
the check for:
(1) IndependantBranches,
(2) User logged in,
(3) User Not superlibrarian, and
(4) User branch set.
Bug 3107. Creation of `permissions` table fails during the web-installation (ru-RU)
ERROR 1452 (23000) at line 3: Cannot add or update a child row: a foreign key constraint fails (`koha/permissions`,
CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`) ON DELETE CASCADE ON
UPDATE CASCADE)
Joe Atzberger [Tue, 19 May 2009 18:23:49 +0000 (13:23 -0500)]
Cleanup returns, consolidate some repeated logic.
Use one $userenv_branch instead of many calls to C4::Context->userenv->{'branch'}
for comparisons. Script is not warnings safe yet, but getting closer.
Galen Charlton [Tue, 19 May 2009 12:22:42 +0000 (07:22 -0500)]
bug 3236: remove disused scripts and a function
Removed opac/opac-dictionary.pl and catalogue/dictionary.pl,
which were not in use and not linked to from any active
template files. According to Henri, the functionality that
these scripts implemented hasn't been working since 2.2.
Also removed C4::Search::findseealso(), which was used
only by the two scripts.
Garry Collum [Sun, 17 May 2009 22:20:05 +0000 (18:20 -0400)]
Bug 1768: Calendar now retains the month on which the user was entering data.
If a user adds or edits a holiday, the calendar will now return to the month in which the user was working. Also after an add or an edit, if the user selects another location, the calendar remains in the same month for which the add or edit took place. The user sees a 'calendardate' parameter in the URL in the format that is chosen as the system preference. If an invalid date is entered in the url, the current date is used.
Galen Charlton [Fri, 15 May 2009 14:40:00 +0000 (09:40 -0500)]
bug 1448: improve subject classification browser
* turn on warnings
* fix problem where the top level of the classification
hiearchy wasn't displayed, instead pointing to
the link to the Wiki page with instructions on
how to set up the feature.
* fix XHTML validation errors
Brian Harrington [Wed, 29 Apr 2009 17:37:06 +0000 (13:37 -0400)]
Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl. I
also realized I can't count. :-)
Modified per comments by Joe and Galen to keep SetMarcUnicodeFlag
and move it and the leader set to earlier in the process.
Joe Atzberger [Thu, 14 May 2009 20:28:40 +0000 (15:28 -0500)]
@renew_failed can cause enormous performance-killing array.
The array was populated and values flagged with an accessor, like:
for (@failedrenews) { $renew_failed[$_] = 1; }
But this means that an array of possibly hundreds of thousands of elements
would have to be auto-populated for high itemnumbers. A hash is the correct
structure. We also haven't checked the user input for validity, so we do not know
for sure that @failedrenews really does contain just itemnumbers.
This adds two new C4 modules, C4::Service and ::Output::JSONStream, and
makes important modifications to C4::Output. The first two are a basic
framework for JSON-based AJAX services and a simple JSON output wrapper,
respectively. C4::Output has been slightly refactored, with a new
function, output_with_http_headers, that supports different
content-types. output_html_with_http_headers still exists, and the three
pages affected by this change have been refactored to support it.
Galen Charlton [Thu, 14 May 2009 00:37:17 +0000 (19:37 -0500)]
bug 3223: add 500 and 590 to MARC21 bib Note index (Zebra)
Note: to completely apply this change, ensure that the working
copy of record.abs is updated and rebuild the bib indexes
using rebuild_zebra.pl -b -x -r
Garry Collum [Tue, 12 May 2009 20:53:15 +0000 (16:53 -0400)]
Bug 1440: Show a list of holidays. Second patch.
Fixed XHTML error that was introduced in the first patch. Added zebra striping to the tables. Removed an erroneous line with a date experiment that had no affect on the dates.
Garry Collum [Tue, 12 May 2009 02:51:07 +0000 (22:51 -0400)]
Bug 1440: Show a list of holidays
This patch adds displays for holidays. A table for each type of holiday. It could be improved by adding a link for a holiday listed in one of the tables to the edit panel. The date formats could also be changed.
Chris Catalfo [Tue, 12 May 2009 00:35:13 +0000 (00:35 +0000)]
Bug 1907 partial fix: prevent warnings on undefined params.
This patch adds default blank values for a couple of params the script might receive which were producing warns in the error log. Also wraps GetMarcBiblio in an eval.
Joe Atzberger [Mon, 11 May 2009 21:44:29 +0000 (16:44 -0500)]
Script to check for corruption of marcxml, and optionally to attempt fix.
When marcxml cannot be parsed into a MARC::Record object, the biblio is
undisplayable and it obviously breaks many features in Koha. This script
can test to parse every marcxml, and alert on failures. Optionally, the
marcxml can be replaced from the marc field.
(bug #1578) Add the (quasi)full COinS(Zotero) support
this patch do a lot of things :
* Add the function GetCOinSBiblio in C4::Biblio, return the COinS value that must be put in a span title
This will be usefull for OpenURL support.
* Replace the span in opac-detail, and put the var get from GetCOinSBiblio
* Fix an <img> tag that wasn't autoclosed
* Add the COinS in search result
* Full COinS support of UNIMARC, the MARC21 support should be improved to provide all kind of document types
Joe Atzberger [Fri, 23 Jan 2009 22:22:40 +0000 (16:22 -0600)]
Prevent fines failure on NULL borrowernumber.
The problem is that we do not ensure that the issues table has valid
borrowernumber in each line. This is exacerbated by Getoverdues()
returning data sorted BY borrowernumber. So one NULL borrowernumber
in issues prevented ALL fines from being assessed. The actual error
from fines.pl cron log is:
No branchcode argument to new. Should be C4::Calendar->new(branchcode => $branchcode)
at /home/user/kohaclone/misc/cronjobs/fines.pl line 98
This patch deals only with getting fines to avoid crashing. It does
not fix the underlying data integrity problem.
Galen Charlton [Mon, 11 May 2009 21:22:04 +0000 (16:22 -0500)]
excised hard-coded reference to HLT
Note to Chris Cormack: I suspect the current ability
to override most circulation conditions is sufficient,
but if HLT still needs to establish a patron category
that can ignore issuingimpossible limitations, needs
to be done in a more flexible way.
Galen Charlton [Mon, 11 May 2009 20:25:14 +0000 (15:25 -0500)]
bug 2770: add RenewalPeriodBase syspref for 3.2 (DB rev 032)
Reconciliation patch to add the RenewalPeriodBase system
preference, which per code by Nahuel Angelinetti changes
the process of calculating the due date after a renewal:
If RenewalPeriodBase is set to 'now', the due date is
set to the current date + the loan period. This is the
current behavior.
If RenewalPeriodBase is set to 'date_due', the due date
is set to the due date before the renewal + the loan period.
Unless like the corresonding database update in the 3.0.x branch
(3.00.01.007), the default value of RenewalPeriodBase is set to
'now' so as not to unexpectedly change the calculation.
change the date calc, to set the date_due to date_due+loanlength.
At the moment when you renew a document the date_due calculated is now+loanlength, but it's a bad thing, It should be
date_due+loanlength.
This patch do change Circulation.pm to use the date_due as renew base and add the loanlength to get the new date_due after
renewal.
Paul Poulain [Sat, 18 Apr 2009 20:51:41 +0000 (22:51 +0200)]
fix for #988
When a borrower can't issue any book (issuingrules=0), the message should be
"this user can't issue book" and not "too many books already issued"wrong message
Add a date field in news edition, and permit to set the "timestamp" field, that is the publication date and modify the GetNewsToDisplay to return only news that timestamp is < to current date that permit to publish news later without any action.
Michael Hafen [Wed, 6 May 2009 22:15:08 +0000 (16:15 -0600)]
bugfix stickyduedate more sticky - couple more forms in circulation.tmpl
There are a couple more forms in circulation.tmpl that need the
stickyduedate and duedatespec hidden inputs. The 'Don't Check Out' form
of the needsconfirmation block, and the findborrower form.
Galen Charlton [Fri, 8 May 2009 20:10:15 +0000 (15:10 -0500)]
bug 3212: MARC21 bib leader plugin sets Leader/09 to 'a'
Changed the plugin so that the form for editing the MARC21
leader now sets postion 9 (character coding) to 'a' (UCS/Unicode)
and no longer gives the cataloger the option to change it. Koha
uses UTF-8 exclusively for MARC records, and a number of bugs
can be triggered by storing MARC21 bib and authority record
whose Leader/09 is anything other than 'a'. Since internal
routines are increasingly ensuring that the MARC21 Leader/09 is
set to 'a', it doesn't make sense to give catalogers the idea
that it's possible (or a good idea) to set the Leader/09 to any
other value.
Note that as a result of this patch, not only will the
page use valid XHTML, but the intranet stylesheets are
now used, IMO improving the display of the form.
This patch also fixes the descriptions of the Leader/09
and Leader/17.
Galen Charlton [Fri, 8 May 2009 20:10:13 +0000 (15:10 -0500)]
bug 3209: add 'p' (mixed materials) to MARC21 Leader/06 dropdown
Also made the following updates to the MARC21 leader plugin
[1] Changed description of Leader/08 to 'Type of control'
[2] Fixed typo in description value for 'z' in Leader/17
[3] Updated Leader/19, which is now 'Multipart resource record level'
Galen Charlton [Fri, 8 May 2009 22:31:14 +0000 (17:31 -0500)]
bug 3120: tweak splitting of Dewey call number
If a call number prefix contains a hyphen, try not to
split on the hyphen. For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:
Frédéric Demians [Mon, 11 May 2009 11:41:50 +0000 (13:41 +0200)]
Bug 3213 - Add UNIMARC XSLT stylesheet
With those stylesheets result and detail pages
render better UNIMARC biblio record than normal
views. But works still have to be done in order
to reach UNIMARC-ISBD compliant display.