Koha/acqui
Tomas Cohen Arazi daf2ebc4f5 Bug 11096: support the retrieval of large MARCXML records
This patch makes Koha <-> Zebra use MARCXML for the serialization when
using DOM, and USMARC for GRS-1.

* The following functions are modified to set the Zebra record syntax
according to the current sysprefs and configuration:

- C4::Context->Zconn
- C4::Context-_new_Zconn

* A new function 'new_record_from_zebra' is introduced, which checks the
context we are in, and creates the MARC::Record object using the right
constructor.

The following packages get touched to make use of the new function:
- C4::Search
- C4::AuthoritiesMarc

and the same happens to the UI scripts that make use of them (both in
the OPAC and STAFF interfaces).

* Calls to the unsafe ZOOM::Record->render()[1] method are removed.

Due to this last change the code for building facets was rewritten. And
for performance on the facets creation I pushed higher version
dependencies for MARC::File::XML and MARC::Record (we rely on
MARC::Field->as_string).

* Calls to MARC::Record->new_from_xml and MARC::Record->new_from_usmarc
are wrapped with eval for catching problems [2].

* As of bug 3087, UNIMARC uses the 'unimarc' record syntax. this case is
  correctly handled.
* As of bug 7818 misc/migration_tools/rebuild_zebra.pl behaves like:

- bib_index_mode (defaults to 'grs1' if not specified)
- auth_index_mode (defaults to 'dom')

here we do exactly the same.

To test:
 - prove t/db_dependent/Search.t should pass.
 - Searching should remain functional.
 - Indexing and searching for a big record should work (that's what the
   unit tests do).
 - Test an index scan search (on the staff interface):
    Search > More options > Check "Scan indexes".
 - Enable 'itemBarcodeFallbackSearch' and try to circulate any word, it
   shouldn't break.
 - Searching for a biblio in a new subscription shouldn't break.
 - Running bulkmarcimport.pl shouldn't break.
 - And so on... for the rest of the .pl files.

[1] http://search.cpan.org/~mirk/Net-Z3950-ZOOM/lib/ZOOM.pod#render()
[2] a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-28 19:50:09 +00:00
..
pdfformat Bug 10573: (follow-up) update license and copyright statement 2013-08-17 16:06:06 +00:00
acqui-home.pl Bug 10792: fix sorting of funds table on acquisitions home page 2013-09-16 15:30:33 +00:00
addorder.pl Bug 9822: Alert on adding an order to a basket if budget s exceeded 2013-10-30 15:10:11 +00:00
addorderiso2709.pl Bug 11018: allow adding order from a reverted MARC batch 2014-01-17 05:32:42 +00:00
aqbasketuser_search.pl Bug 7295: More granular permissions for baskets 2013-10-31 16:35:35 +00:00
basket.pl Bug 10277 - Add C4::Context->IsSuperLibrarian() 2013-12-30 15:47:23 +00:00
basketgroup.pl Bug 11471: Display the currency for baskets in a basketgroup 2014-02-21 19:41:07 +00:00
basketheader.pl Bug 9364: fixes billing/delivery addresses for new baskets 2013-01-18 19:15:24 -05:00
booksellers.pl Bug 11171: Display basket group name on the supplier list page 2013-11-27 18:02:21 +00:00
check_budget_total.pl Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
check_duplicate_barcode_ajax.pl Bug 6963: Corrects a problem when a new order is created with a duplicate barcode. 2011-11-04 10:22:28 +01:00
check_uniqueness.pl Bug 10483: fix item uniqueness check on order form 2013-08-14 21:17:11 +00:00
currency.pl Fix FSF address in directory acqui/ 2010-03-16 20:17:51 -04:00
fetch_sort_dropbox.pl Bug 8629: update of statistics fields on fund selection in order creation/edition 2012-09-14 16:57:02 +02:00
finishreceive.pl Bug 11141: retain pending order filters during receiving. 2014-01-23 16:03:49 +00:00
histsearch.pl Bug 5336: (follow-up) multiple QA fixes 2013-10-22 13:30:34 +00:00
invoice.pl Bug 10401: Add ability to merge invoices 2013-10-21 19:08:03 +00:00
invoices.pl Bug 10401: Add ability to merge invoices 2013-10-21 19:08:03 +00:00
lateorders-export.pl Bug 7298: (follow-up) various QA fixes 2013-10-31 15:51:25 +00:00
lateorders.pl Bug 7298: (follow-up) fix uninitialized variable warning 2013-10-31 15:52:47 +00:00
modordernotes.pl Bug 7166: Adds edit order notes when the basket is closed 2012-03-20 16:45:37 +01:00
neworderbiblio.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
neworderempty.pl Bug 10277 - Add C4::Context->IsSuperLibrarian() 2013-12-30 15:47:23 +00:00
newordersubscription.pl Bug 9508: Standardize the dateformat value from C4::Auth 2013-05-20 09:05:01 -07:00
newordersuggestion.pl Bug 4330 : Fixing FSF address and copyright headers for acqui/ 2012-05-28 17:54:18 +02:00
ordered.pl Bug 7735: removal of C4::Dates when unused 2012-03-20 18:11:04 +01:00
orderreceive.pl Bug 10403: Show inactive but unlocked budgets on orderreceive 2013-10-22 12:57:41 +00:00
parcel.pl Bug 9823: Refactor return from GetReservesFromBiblionumber 2014-01-30 16:19:55 +00:00
parcels.pl Bug 8821: make receive shipment page hide inactive funds like new order form 2013-09-16 16:26:12 +00:00
spent.pl Bug 9987: Remove DB field aqorders.biblioitemnunmber 2013-07-02 15:18:50 -07:00
supplier.pl Bug 9108: Followup: send the dateformat value from C4::Auth 2013-01-17 21:59:30 -05:00
transferorder.pl Bug 10723: remove one last instance of GetPendingOrders() 2013-10-21 18:49:32 +00:00
uncertainprice.pl Bug 10723: Merge GetPendingOrders and SearchOrders routines 2013-10-21 18:24:32 +00:00
updatesupplier.pl Bug 5335 - More granular VAT 2012-09-20 18:09:53 +02:00
z3950_search.pl Bug 10096 - Add a Z39.50 interface for authority searching 2013-10-04 14:26:29 +00:00