If BiblioAddsAuthorities is ON, saving a MARC bib record
in the cataloging editor can create new authority records.
When using MARC21, if one of those authority records
has diacritics in its heading, the save crashes with the
following error:
Wide character in null operation at
/usr/local/share/perl/5.8.8/MARC/Charset/Table.pm line 96
To prevent this, new MARC21 authorities created by
BiblioAddsAuthorities have the Leader/09 set to 'a'. Note
that this is not currently required for UNIMARC authorities,
as MARC::File::XML->as_xml_record() does not attempt
to transcode UNIMARC records from MARC-8 to UTF-8.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch changes all $foo eq undef's to !defined($foo). It also makes misc/spellcheck_suggest/build_spellcheck_suggest.pl have proper syntax.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
staff client is defaulting to the ASNCR code instead of the blank above
For some reason the loop used to build the list of values was
setting the first value to the $value variable if $value wasn't
set already, and the default_value was inside rather than outside
the loop. I've removed the setting inside the loop and placed
the default value outide the loop. It's possible I just don't
understand what the original intention was.
There should be a documenation change at least for 3.0 to the effect that on systems
not running JavaScript, 'incremental' is the only option available for autoBarcode
although other options appear. A fix for this will hopefully appear in 3.2.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
a default installation:
1. Re-names several of the item fields to make more sense to catalogers and patrons
2. Remove links Non-public note from items.paidfor
3. Changes Non-public note to be hidden in the OPAC view
Fixes issues with the 'hidden' field in the framework, specifically:
1. the editor obeys the rules of possible values for hidden (>4, or <-4)
2. the OPAC MARC display obeys the rules of positive values meaning 'hidden in OPAC'
3. the staff MARC display now obeys the rules specified in the hidden values description
yesterday, the C4::Output::pagination_bar had a bug in it that I was crudely working around.
atz fixed that bug this morning. This patch removes the workaround. Thanks, atz!
I'm sending along atz's patch again with my signoff. It needs to be applied before this, as does the
other 1980 patch. I have sent that along (again), too, with a modified subject line. That makes a total of 3 patches for 1980.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4::Search::SimpleSearch was alredy patched to let you pass in the number of results you want back.
These instances were not using the new API. This patch makes all calls to SimpleSearch specify a limit.
I improved the documentation of SimpleSearch a bit to include the third returned value.
I believe there's a bug in C4::Output::pagination_bar, in that it doesn't deal well with URLs
with only one pair of parameter=value passed to it. I'm getting around this by passing in a second
pair that does nothing.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
1. Replaces display hostname with servername as shown on the selection screen.
2. If the record download errors, try to display the error.
3. A more useful warning if $DEBUG is set.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
A button to delete (non-mandatory) subfields and fields
is added to the bib and authority MARC editors. This button,
which displays as a hypen or minus sign after the plus sign
to clone a field, acts as follows:
[1] When deleting a whole MARC field, if at least
one other repeat of that field exists, deletes
the field from the editor page. If the field
to be deleted is the last instance of that tag,
the contents of the field are cleared, not removed.
This allows one to delete all 650 tags, then
add a new one without having to reload the
record in the editor.
[2] When deleting a subfield, if at least one other
repeat of that subfield and its tag occurs
*anywhere else in the record, not necessarily in the same tag*,
deletes the subfield.
Otherwise, if the subfield is the last occurrence
of that tag/subfield combination, clears the input
form instead.
Documentation note: new screenshots for MARC editor, plus
description of the '-' button.
Credit to MJ Ray for introducing the '-' button
and the UnCloneField JavaScript function.
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The maximum length allowed for input into a subfield in
the MARC editor has been increased to 9999 charaacters
(from 255), permitting data entry of a field that meets
the maximum MARC field limit of 9999 octets.
Also set the maximum length for the leader form input
to 24 characters and the length for the MARC21 008
to 40 characters.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Improved C4::AuthoritiesMarc::GetAuthType() so that
it returns either a hashref (if the authority type exists)
or undef (if it does not exist). The same
accessor should not be used to either return a single
value or all values of a settings list. Note that
all existing clients of GetAuthType are expecting
either a single hashref or undef; none of them
expected the arrayref that could be returned by
the previous version of the accessor.
When BiblioAddsAuthorities is ON, addbiblio.pl
now checks the return value of GetAuthType and
no longer crashes as follows if the MARC framework
specifies an invalid authority type for a given subfield:
Can't coerce array into hash at .../cataloging/addbiblio.pl line 738.
No documentation changes.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If a field can be linked to an authority record (i.e.,
an authtypecode is defined for subfield $a), always
include the subfield $9 in a (readonly) input element even
if it is marked hidden per the MARC framework.
Prior to this patch, a $9 marked hidden per the framework
would not be included in the form, causing the authority record
number link to not be added when choosing a heading from the authority
finder. In other words, with BiblioAddsAuthorities OFF,
any authorized headings in bibs added via the MARC editor
would not have the subfield $9, and thus would appear
to not be used by any bibs.
Note that subfield $9 is set to be readonly, as changing the
authority number link does not currently change the
heading stored in the bib record.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Instead of having one input field for both indicators
of a variable field, the bib and authority MARC editor
now has an input field for each indicator. This has
two main advantages:
* it is easier to tell what the indicator values are,
even when the first indicator is a space
* it is easier to set the first indicator to blank
and the second indicator to non-blank.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.
Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.
Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
disabled values are not passed to CGI.
So that if you disable entry, values and subfield codes are mixed up.
I changed disabled=tru to readonly and it fixes the bug.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
this commit restore a better behaviour :
- if ON : the librarian can enter manually an authority-linked marc field. and if it does not exist in the authorities file, it will be created automatically
- if OFF : the authority must exist in the authority file, and the librarian can't enter if manually in the MARC editor
This patch just deals with the OFF case (the ON was already here). With OFF the behaviour is now the same as in 2.2
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:
* borrowernumber and biblionumber in old_reserves can be
NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
set the child column to NULL if the parent row is deleted
instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
a branch to be deleted without changing archived requests.
Some miscellaneous cleanup was done as part of this patch:
* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* 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>
encoding is now defaulted to MARC8
encoding is now supported for USMARC and UNIMARC flavours.
Adding Encoding field to updatedatabase.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved this function from an exported function in
C4::Biblio to a public but unexported function
in C4::Items. Added comment noting that this
is used only by additem.pl.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Introduced C4::Items module to separate items API
from biblio API. Details on changes will be
put in later commit messages.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Allow plugins to be be launched from authorities
editor as well as bib editor, without duplicating
plugin_launcher.pl.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>