Commit graph

1660 commits

Author SHA1 Message Date
Joshua Ferraro
c7f22f84ad additional updates to language support
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:47 -06:00
Joshua Ferraro
678b52a2f2 refactoring changelanguage, better var names, etc.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:38 -06:00
Joshua Ferraro
11e3820094 removing warns from Output.pm
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:22 -06:00
Joshua Ferraro
922386c6a0 fix the 'current language' change language display
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:16 -06:00
Joshua Ferraro
fe1b2e4882 template improvement: fall back on english if the template file doesn't exist
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:12 -06:00
Joshua Ferraro
6072ccc28e Improvements to handling language subtags
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:10 -06:00
Joshua Ferraro
aabd1c57a0 rename internal function
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:04 -06:00
Joshua Ferraro
17d42eba70 remove warn
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:58:56 -06:00
Joshua Ferraro
a929fc2dae adding bi-directional support to the OPAC based on the language
selected (Hebrew and Arabic currently set)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:58:46 -06:00
Joshua Ferraro
b0dc874d4b Switching Languages.pm to EXPORT_OK -- don't export
all functions by default. Adding languages_loop to all
templates

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:58:41 -06:00
Joshua Ferraro
8d072519b6 synching deletedborrowers table with borrowers table
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 21:30:30 -06:00
Joshua Ferraro
c2513fb4ba additional fixes to permissions
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 21:30:22 -06:00
Galen Charlton
f41be7ff10 added C4/AuthoritesMarc/*.pm missed in previous patch
oops!

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 19:08:30 -06:00
Galen Charlton
8340c478fa start of big MARC21 authorities work
* Defined local field 942$a to store the authority type
  for MARC21 instead of 152$b
* Added 942$b to MARC21 authority framework.
* Added auth_header.authid and auth_header.authtypecode
  to appropriate subfields in MARC21 authority framework.
* Started work on two new modules:
    C4::AuthoritiesMarc::MARC21
    C4::AuthoritiesMarc::UNIMARC
  These modules will be used to extract MARC-format-specific
  behavior out of C4::AuthoritiesMarc
* Updated Zebra config for MARC21 to use only the 942$a
  for the authority type.
* For MARC21, added logic to move 152$b to 942$a for
  existing authority records.  Specifically, AddAuthority
  now does this move when a record is saved, while
  GetAuthority and GetAuthorityXML do this when
  extracting a record for other use.  This logic
  is temporary, and can hopefully be removed later, once
  use of 152$b in MARC21 authorities is confirmed to be
  absent for Koha users.  I will also create a batch
  job to do this update in one fell swoop.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 18:42:40 -06:00
Galen Charlton
25b4628e8d minor POD correction
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-04 18:40:55 -06:00
Joshua Ferraro
d205be1ba2 fix for bug 1736: Zebra searching, " " quotes cannot access second page when used
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 23:29:04 -06:00
Galen Charlton
25cb12ec97 add INIT block to import C4::Items
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:24:11 -06:00
Galen Charlton
2cb5a9e32e C4::Circulation - ensure that certain modules always get imported
For some reason currently unclear to me, a use 'C4::XXX' does
not seem to guarantee that the contents of C4::XXX's
@EXPORT gets imported into C4::Circulation's symbol table.

Added an INIT block to ensure that this gets done as
part of runtime initialization.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:24:09 -06:00
Galen Charlton
8c60e82605 fixed variable masking warnings found by perl -w
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:23:59 -06:00
Joe Atzberger
61bc312d13 Labels.pm - add deduplicate_batch sub
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:27:03 -06:00
Galen Charlton
15015f6a54 item rework: correct '' for various status fields
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:26:47 -06:00
Galen Charlton
98180ac0a1 batch import: do not ersatz MARC item fields
Batch import was not removing item fields (e.g., 952
or 995) from MARC records.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:26:41 -06:00
Galen Charlton
c2a0ed8077 item rework: replaced AddBiblioAndItems
Replace C4::Biblio::AddBiblioAndItems with two
things:

* An option to C4::Biblio::AddBiblio to defer writing
  biblioitems.marc and biblioitems.marcxml.  This
  option was created to give a significant
  speed boost to bulkmarcimport.pl, but is *not*
  recommended for general use.
* C4::Items::AddItemBatchFromMarc

This refactoring removes the need to have functions
in C4::Biblio and C4::Items that call each other's
private functions.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:26:16 -06:00
Galen Charlton
4252673d6c removed more redundant 'my' causing variable masking warnings
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:49 -06:00
Galen Charlton
6a903c85b9 removed extra 'my' that was causing a masking warning
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:47 -06:00
Galen Charlton
9d4d8897b2 item rework: various changes
* Move CheckItemPreSave to C4::Items (from C4::Biblio)
* Modified C4::Biblio::AddBiblioAndItems to use appropriate
   internal routines from C4::Items
* Moved GetItemnumberFromBarcode to C4::Items
* Removed duplicate C4::Biblio::_koha_new_items
* Removed disused C4::Biblio::MARCitemchange

Currently AddBiblioAndItems is a special routine that
uses private subs from both C4::Biblio and C4::Items.
This needs to be refactored.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:42 -06:00
Galen Charlton
82df05847a removed 'use' that was causing redefined sub warning
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:13 -06:00
Galen Charlton
95cfd76815 removed duplicate call to C4::Context->marcfromkohafield
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:10 -06:00
Galen Charlton
3b43e43e49 item rework: moved DelItem
Moved from C4::Biblio to C4::Items

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:07 -06:00
Galen Charlton
8e41022b0d item rework: moved various accessor functions
Moved following functions from C4::Biblio to
C4::Items:

    GetItemStatus
    GetItemLocation
    GetLostItems
    GetItemsForInventory
    GetItemsCount
    GetItemInfosOf
    GetItemsByBiblioitemnumber
    GetItemsInfo
    get_itemnumbers_of

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:25:05 -06:00
Galen Charlton
35f8f65b41 item rework: replace direct SQL update of items
with ModItem calls

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:38 -06:00
Galen Charlton
526eafe4e1 check for undefined values when mapping item to MARC
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:33 -06:00
Galen Charlton
8f377faa76 item rework: POD and comments improvement
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:21 -06:00
Galen Charlton
9d71bbb461 _replace_item_field_in_biblio now handles missing item field
If an item field with the appropriate itemnumber does not
exist in the MARC bib, the incoming item field is now
just added instead of being ignored.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:19 -06:00
Galen Charlton
9e7c94bf96 item rework: moved GetItem
Moved from C4::Biblio to C4::Items.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:04 -06:00
Galen Charlton
7ed543b8a7 item rework: moved GetMarcItem
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>
2008-01-03 16:23:56 -06:00
Galen Charlton
b7c35853f2 item rework: do not allow bulkedit to update items
This patch is meant to guarantee that a bulkedit
does not try to edit an item tag embedded in a MARC
biblio without updating the items feature.  It is
not a comprehensive fix of the bulkedit feature, which
currently does not appear to be functional and
needs some thought:

* The general search results is probably not the
  best place to put this feature -- it should
  probably be in tools.
* A bulk edit of something like items is desireable,
  but needs to be designed so that it respects
  business logic for circulation and acquisitions.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:47 -06:00
Galen Charlton
bc9ee0cff9 item rework: moved ModItemInMarc
* Moved exported ModItemInMarc from C4::Biblio to
  C4::Items and renamed to _replace_item_field_in_biblio.
  Function is now private and is not exported, as
  ModItem is now the sole entry point for updating
  an item record.
* Replaced calls to ModItemInMarc in C4::Circulation
  with appropriate ModItem calls.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:23 -06:00
Galen Charlton
c58ca5dd5a items rework: fix several non-NULL columns during ModItem
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:13 -06:00
Galen Charlton
c6c8e80a73 start of BIB change -- introduce C4::Items
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>
2008-01-03 16:23:12 -06:00
Joshua Ferraro
5c23369af2 Fixing Database Definitions for Statuses *PARTIAL*
Prior to this fix, the status fields had three 'off' values, NULL, "",
and 0. I've reduced it to two in the db, removing the option for NULL, and
setting the default value to 0, however, we need to verify that we don't ever
write out as "" as this needlessly complicates the indexing process,
critical for searching or limiting by status (e.g., availability). Also,
queries that attempt to write a NULL value to one of these fields will fail
(based on my tests).

This patch includes the following changes:

* Updated the database definition for notforloan, damaged, itemlost, and
wthdrawn in kohastructure.sql to forbid NULL and default to 0; MySQL
can't forbid other values (such as empty ""), so this has to be handled
at the application layer and REQUIRES further patching.

* Fixed the 'limit by availability' query node in Search.pm to use a
much less confusing definition of 'available'

* Added code to set values to 0 where they are NULL or empty ( "" ) for
notforloan, damaged, itemlost or wthdrawn in both the MARC and the items
table:

  * Biblio.pm -> AddBiblioAndItems
  * catalogue/updateitem.pl
  * SEE NOTE BELOW, REQUIRES UPDATE TO THE REST OF KOHA'S ITEM MGT!

* Removed code in bulkmarcimport.pl that sets notforloan status depending
  on item-level or bib-level itemtype -- that flag is designed to be set
  only to override the notforloan setting for the item's (or bib's,
  depending on the syspref) assigned itemtype (it doesn't need to override
  to 'for loan', only to 'not for loan').

  added $dbh->do("truncate zebraqueue"); when operation is 'delete'

* I updated some notes in catalogue/updateitem.pl as to why ModItem can't be
used -- we don't have _a_ place where we can change the item and marc :/

  I've tested the following:

  bulkmarcimport.pl..........................MARC/items OK
  Staged Records Import......................NOT OK
  updateitem.pl (via moredetail.pl)..........MARC/items OK
  circulation.pl.............................NOT OK
  returns.pl.................................NOT OK
  addbiblio.pl...............................NOT OK
  additem.pl.................................NOT OK

Basically, there isn't a single place to apply this patch that will
update both item data and MARC data in one place ... a future patch
needs to address this issue.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:23:04 -06:00
Joshua Ferraro
05290bb1b5 Improving searchhighlightblob, similar to Paul's patch:
1. doesn't remove author_nospan, and <span>s around bib fields for
display, perhaps they should just get a separate style?

2. using subfields now

3. improved ability to highlight small words (3 chars and less)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 01:39:13 -06:00
Henri-Damien LAURENT
ee252ad5af NZSearch debugging
Adding NZoperatorAND NZoperatorOR NZoperatorNOT
Using NZOperatorAND NOT in NZanalyse
Some problem solved.

Please test.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 00:48:26 -06:00
Joshua Ferraro
aabea3417b WARNING: Updates to Index Defs for Authorities
This commit is a partial fix to authority control for MARC21,
and better authority handling in general (for UNIMARC too).
Before this patch, authority searching, editing, saving, was
not functioning, or was extremely buggy.

WARNING: You will need to re-index your authority database after
applying this commit.

The following changes have been made:

  * Normalizing record.abs index names (in both MARC21 and UNIMARC)
  * Synching authorities/bib1.att, ccl.properties, AuthoritiesMarc.pm
    with new indexes (UNIMARC too)
  * Clean up biblios/bib1.att (remove duplicate att defs)
  * Clean up authorities-* templates to conform to new styles
  * Fixed search failure when using Default framework (now searches
    All)

Also included are several fixes to the built-in SRU server for
Authority and Biblio, it's recommended that you update your
koha-conf.xml file:

  * adding explain-authorities.xml and explain-biblios.xml
  * adding necessary info to koha-conf.xml to enable SRU/W
  * adding several example XSLT stylesheets, that can be used
    for SRU on-the-fly transformations (to MODS, DC, RDF, etc.)

Still remaining for 3.0 are the following tasks:

  * update MARC21 frameworks (authority and cross-reference bib)
  * update display code/templates in authority results list
  * update search code/templates to utilize index points
  * implement 'grouping' of authtypes for searching (Name, Title, Subject)
  * repair utility to import auths and perform matching
  * repair bibliographic import to match auths and warn if no match

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 00:28:40 -06:00
Mason James
5dacccedec TransformHtmlToXml() now checks from UNIMARC flavour, before inserting encoding info to 100$a
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-02 07:54:30 -06:00
Ryan Higgins
31ddb16fa2 Fix bug in ModReceiveOrder call
had been losing datereceived and replacementprice on modorder.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 18:42:48 -06:00
Ryan Higgins
52e1a15e5a Specify datereceived when receiving a new parcel.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 18:42:47 -06:00
Chris Cormack
3bccf02a66 Fix for bug 1711
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 17:43:42 -06:00
Ryan Higgins
b2f5cf3ad2 Further updates to acq, merging in dev_week mods.
Splitting orders now on receipt.
Many tmpl updates to pass correct values btwn scripts.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 15:07:08 -06:00
Ryan Higgins
4b089e1eee updates to acqui - first of several commits
bug fixes to display and save publishercode and purchase order numbers.
use invoice number in place of parcel code
fix template apparently allowing user to modify biblio details on add/mod order
removing CGI scrolling_list

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 15:07:02 -06:00