Paul POULAIN [Sun, 10 Feb 2008 07:41:43 +0000 (01:41 -0600)]
switching home and holdingbranch (rewritten)
This is an improvement of a patch that has previously been rejected: I wanted to display holdingbranch, kados prefer homebranch
(and in fact it depends on the library choice...)
now, the library can choose, thanks to HomeOrHoldingBranch syspref.
Note that I have changed the description of the syspref to reflect this new use
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Fri, 8 Feb 2008 22:35:18 +0000 (16:35 -0600)]
added StripNonXmlChars to C4::Charset
Added invocations of StripNonXmlChars to uses
of new_from_xml() that involve records
saved to Koha fields via MARC::Record->as_xml();
for batch jobs that work on MARC XML files
coming from external sources, StripNonXmlChars
should not necessarily be used, as it may
be better to reject a file or record if it
contains that kind of encoding error.
Galen Charlton [Thu, 7 Feb 2008 06:11:47 +0000 (00:11 -0600)]
experiment: use PazPar2 to group related works
The approach is to use PazPar2 to search just one
target, the biblio Zebra database. The results
of each set are merged by PazPar2 to generate a
hitlist that combines related bibs together; as an
example, if a library has the first Harry Potter
book in three languages and an audiobook format,
the hitlist should ideally return one result
for the work that includes links to the individual
bibs.
The new module C4::Search::PazPar2 implements a
simple client for PazPar2's XML-over-HTTP API. It is
designed to be generic, and thus may end up getting
moved out of Koha to become a stand-alone CPAN module.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Thu, 7 Feb 2008 06:11:37 +0000 (00:11 -0600)]
authorities - new module - C4::Heading
Objects of type C4::Heading represent
headings and are (currently) initialized
from bib MARC::Field objects. A C4::Heading
has the ability via SimpleSearch to locate
the authority records that are either authorizing
the heading itself or contained more preferred
terms for the heading via See links.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Thu, 7 Feb 2008 06:11:33 +0000 (00:11 -0600)]
authorities indexing - MAJOR changes
For DOM indexing, added index_matching_heading option
to create indexes for matching an entire authority
heading -- the index works by indexing a heading
such
150 $aCars$xElectric$zEngland$vScience fiction
as something like
"cars generalsubdiv electric geographicsubdiv england
formsubdiv science fiction"
Also started adjust names of some indexes to conform
to languaged used in the MARC21 and UNIMARC standards, e.g.,
Modified viewlog.pl to discern where it was called from and display the appropriate menu.
If viewlog.pl is called from the circulation menu, then the circulation menu is displayed.
If viewlog.pl is called otherwise, the tools menu is displayed.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Added GetPatronImage function to Members.pm
Added code to circulation.pl, boraccount.pl, readingrec.pl, and moremember.pl to grab patron image and pass it off to the template
Corrected code in circ-menu.inc to properly display patron image.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Bug Fixing : Could not add new undefined tag if searchfield>0
For instance, search for tag 290
cannot find.
Click on addTag
Save
Then wouldnot add tag 290 because used UPDATE.
Now, if tag is not found then Add tag is done.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Fri, 1 Feb 2008 00:27:05 +0000 (18:27 -0600)]
temp bugfix -- restore file upload functionality
CGI->new() should not be used in any C4 module -
it has a side-effect that breaks the AJAX
file upload script. Specifically, any file upload
field is slurped when a new CGI object is created, and
is not available to a second object created by CGI->new().
Consequently, C4::Debug should not be instantiating
a CGI object in its BEGIN block. It can use other CGI::* modules
to parse QUERY_STRING to get the value of the debug
parameter (note that this means that the debug param
can be reliably set only in a GET, not as part of a
form submission).
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Fri, 1 Feb 2008 00:27:04 +0000 (18:27 -0600)]
IMPORTANT - refactor MARC character set handling
* IsStringUTF8ish - determine if scalar contains a string in UTF8
* MarcToUTF8Record - convert MARC blob or MARC::Record to UTF8
* SetMarcUnicodeFlag - set appropriate MARC21 or UNIMARC field to
indicate that record is in UTF-8.
Design points of this module include:
* No dependencies on other C4 modules, making it easier to add
more test cases
* All character conversion code in one place
* Single entry point for doing a character conversion on a
MARC record
* Capture of errors and warnings produced by Text::Iconv
and MARC::Charset
* Start of support for guessing the source character set of
a MARC record.
Several functions were moved from other scripts
or modules to C4::Charset:
* C4::Koha->FixEncoding (expanded and renamed
MarcToUTF8Record)
* C4::Koha->char_decode5426
* fMARC8ToUTF8 from bulkmarcimport.pl (renamed
_marc_marc8_to_utf8)
Several batch jobs were adjusted to use MarcToUTF8Record instead of
FixEncoding.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Owen Leonard [Thu, 31 Jan 2008 19:43:22 +0000 (13:43 -0600)]
Removing some unused include files; Correcting nomenclature for cart; hiding quick search form on advanced search page; Styling user menu links as sidebar tabs.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Thu, 31 Jan 2008 19:43:17 +0000 (13:43 -0600)]
staged MARC import: handle non-ASCII characters in items
The problem occured during the population of
import_items.marcxml -- the MARC::Record object
created to store the item did not have the Leader/09
set to 'a', which means that MARC::File::XML
tried to transcode code the item from MARC-8 to UTF-8, which
breaks since the MARC data is already in UTF-8 at that point.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Galen Charlton [Thu, 31 Jan 2008 19:43:15 +0000 (13:43 -0600)]
authorities: start of work on reindexing
Currently, MARC authorities are indexed (assuming Zebra
is used) with Zebra's GRS-1 module. However, it does
not appear to be possible to index phrases that cross
subfield boundaries using the GRS-1 module's records.abs
config file's melm, elm, and xelm directives.
Since it is necessary to be able to efficiently search
an entire authority heading (e.g., to see if a given
bib heading is authorized), I'm proposing a switch
to Zebra's DOM XML filter module, which uses XSLT
to generate the words and phrases to be indexed from the
original MARC XML (or ISO2709) record.
The file authority-zebra-indexdefs.xml is an XSLT stylesheet
to implement the new indexing regime. It is based on the
MARC21 authority record.abs with the following changes:
* addition of 148/448/548
* changed name of "see" indexes to "see-from"
* changed name of "see-also" indexes to "see-also-from"
* added index on the subject thesaurus based on
the 008/11 and 040$f
* added indexes on the full heading
authority-zebra-indexdefs.xml was generated from
authority-koha-indexdefs.xml via the XSL transform
koha-indexdefs-to-zebra.xsl. authority-koha-indexdefs.xml
is the actual master version of the indexing definitions,
and was created to provide a much more compact syntax
over the raw XSLT that is to be passed to Zebra.
An experimental schema for Koha indexing definitions is
under way; my aim is to propose a simple format that can
be readily worked with, and perhaps even generated as
a serialization of indexing definitions that are set up
via administration settings in the Koha database itself.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Owen Leonard [Wed, 30 Jan 2008 07:20:55 +0000 (01:20 -0600)]
Working version of cart and lists buttons, with some style changes to cart and lists popups. Bug: cart contents indicator conflicts with button-style js. Also adding new default button style.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>