Commit graph

42 commits

Author SHA1 Message Date
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.

This patch changes the occurences of '.tmpl' in favour of '.tt'.

To test:
- Apply the patch
- Install koha, and verify that every page can be accesed

Regards
To+

P.S. a followup will remove the glue code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-17 11:05:49 -03:00
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
Zeno Tajoli
69c42067ce Bug 11222: fix crash that can occur in search for items to add to label batch
This patch fixes a regression on label-item-search.pl introduced by
the patch for bug 9239 where searching for items to add to a label
batch fails with an error if QueryParser is not enabled and you use
the "Added on or before date" search option.

Test plan:

0) Set "UseQueryParser" to "do not try"
1) Start with an installation with bibliografic data and items
   information.
2) Check that in items there are values inside Accession Date

Without the patch:
a) Go in Home› Tools› Labels  and click on 'New batch'
b) Click on 'Add Item(s)'
c) Try to select items with option "Added on or before date"
d) You will receive an error

With the patch:
Try steps a),b), and c)
Now you don't receive an error and you can select items

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Added a description of the problem and copied the test plan from the bug
report, with the addition of the information that QueryParser must be
off to confirm and test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-23 19:54:38 +00:00
Jared Camins-Esakov
144c7f4e4e Bug 9239: Allow the use of QueryParser for all queries
With the inclusion of this patch, all searches will (try) to use
QueryParser for handling queries for both the bibliographic and authority
databases if UseQueryParser is enabled. If QueryParser is unavailable,
UseQueryParser is disabled, or the search uses CCL indexes, the old
search code will be used.

To test:
1) Apply patch.
2) Run the unit test with `prove t/QueryParser.t`
3) Enable the UseQueryParser syspref.
4) Try searches that should return results in the following places:
   * OPAC (simple search)
   * OPAC (advanced search)
   * OPAC (authorities)
   * Staff client (header search)
   * Staff client (advanced search)
   * Staff client (cataloging search)
   * Staff client (authorities)
   * Staff client (importing a batch using a match point)
   * Staff client (searching for an item for adding to a label)
   * Staff client (acquisitions)
   * Staff client (searching for a record to create a serial)
   * ANYWHERE ELSE I HAVE FORGOTTEN
5) Disable the UseQueryParser syspref. Repeat at least some of the
   searches you did above.
6) If all searches worked, sign off.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Searching still works as expected for variuos places.
QueryParser syspref seemed to be enabled by default

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-16 21:32:32 -04:00
Jonathan Druart
a469663d7b Bug 9108: Followup: send the dateformat value from C4::Auth
- the dateformat value is send to all templates (from
  C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
 - opac/sco/sco-main.pl
 - reports/acquisitions_stats.pl
 - tools/cleanborrowers.pl

All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.

Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
  adding dates

Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-17 21:59:30 -05:00
Colin Campbell
d8b362e0f9 Bug 5415 Let calls of SimpleSearch utilize considtent interface
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:57 +12:00
Lars Wirzenius
772ada9bf3 Fix FSF address in directory labels/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:50 -04:00
Koha User
e3421f0f9f Fixes bug 4232: Undefined hash references in Label Creator
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-10 15:59:35 -05:00
Chris Nighswonger
4a675bcaad [5/30] A rework of Label Creator code
This rework removes code held in common with the Patron Card Creator
and move is to the new C4::Creators module.
2010-01-11 18:16:52 -05:00
dd08a539dc remove unnecesary import of HTM:::Template::pro
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 21:43:12 -04:00
0bbcfeda0e replace syslog with warns
As discussed with Chris Nighswonger on #koha, this patch
removes the calls to syslog and replaces them with warns
so that error messages generated by the labels code
are sent to the Apache error log.  This avoids splitting
this sort of logging across multiple files and is consistent
with current practice in most of the rest of Koha.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 21:43:12 -04:00
Chris Nighswonger
aa16f1229c Adding a missing module to labels search
This causes an error to be thrown if no items are retrieved and the
code goes to call &syslog

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 19:56:21 -04:00
Chris Nighswonger
3720e0261f Fixing warns (tnx to Chris Cormack for identifying these)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 19:56:20 -04:00
Chris Nighswonger
39d227d712 [24/40] Adding single/multiple label printing to label export code and interface.
This adds single/multiple label printing by item number along with new CSV and XML export code.
2009-09-01 15:51:58 -04:00
Chris Nighswonger
c468a724b4 [22/40] General code cleanup of new labels module code. 2009-09-01 15:51:39 -04:00
Chris Nighswonger
c9e6962fd4 [18/40] Work on label item search. 2009-09-01 15:50:51 -04:00
Michael Hafen
41d550df4f bug: add items to label batch - need userenv loaded before call to SimpleSearch
Since I added more IndependantBranches code to my git repo I need
userenv loaded before SimpleSearch() is called.  I think
get_template_and_user() should be called as soon as possible.  In this
case it could mean two calls, but it has to be so.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 13:01:27 -05:00
Galen Charlton
e4cbee8454 perltidy lables/label-item-search.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 15:35:25 -06:00
Galen Charlton
d958db03a2 bug 2505: turn on warnings in labels/label-item-search.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 15:35:17 -06:00
Galen Charlton
330edb157f followup to Mason's labels patch
* fix XHTML errors
* fix problems with paging through results list

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 15:35:08 -06:00
Mason James
990e315471 The current searching in labels is a bit minimal, and current only does keyword searching.
there is some old 2.2 code for more complete labels-searching, thats been commented out

ive logged a 'bug' for this - 2777

http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2777

this fix...
  - enables the index-searching functionality
  - adds date-ranges
  - uses the numSearchResults syspref, not a hardcoded '20'
  - rewrote old 2.2 page-num code, (didnt work for 3.x)
  - some indent and whitepages tidys.
  - unused 2.2 search-code removed.

Mason

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-31 11:15:44 -06:00
Michael Hafen
20c82796aa fix calls to get_template_and_user in label-item-search.pl
remove extra flagsrequired line.
move call in first branch to the top.
  This will be important is IndepenantBranches code is later added to,
for example, C4::Items::get_itemnumbers_of()

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 15:41:40 -05:00
Joe Atzberger
ee48f60a93 DHTMLcalendar should not be imported.
Changing these scripts as precursor to removing it from C4::Dates @EXPORT_OK

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-16 22:21:57 -05:00
Chris Nighswonger
20cfc347e1 Adding trinaries to handle unpopulated itemcallnumber and/or barcode fields
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:13:59 -05:00
Chris Nighswonger
9b47b82a77 Porting SimpleSearch return changes to all code calling it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:45 -05:00
Chris Nighswonger
d50ab5e6e8 Enabling SimpleSearch to return the total number of hits to caller
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:42 -05:00
Chris Nighswonger
f3088a211a Correcting code to pass total number of hits returned to the template.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-14 23:46:59 -05:00
Chris Nighswonger
cd4c9aac43 Bugfix for 1931 as well as a major overhaul in the presentation of the search results.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:49 -05:00
Andrew Moore
73d904a3bf bug 1980: changes to label-item-search.pl to allow pagination over large result sets
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:10 -05:00
Andrew Moore
f4725d5059 Bug 1980: some cleanup, getting ready to add pagination to label-item-search.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:08 -05:00
Chris Nighswonger
dd80cb4f2a More work on patron card generation feature
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:42:38 -05:00
Chris Nighswonger
025d4441e5 Fixes to enable display and selection of individual items rather than bibs.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:39:10 -05:00
Joe Atzberger
192dd7bb2e Labels overhaul - labels were largely broken (and still are somewhat), but this overhaul addresses Add, Delete, deduplication, messages to user, debug, etc.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:27:06 -06:00
Galen Charlton
139635bf3b labels item search: build item list correctly
Do not merge in a field mapped from the MARC biblio
if it already has been brought in from the item.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:55 -06:00
Joe Atzberger
67dce57e08 labels subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 18:21:04 -06:00
Paul POULAIN
a502aa1c76 HTML::Template => HTML::Template::Pro
HTML::Template is no more used, some were remaining,
fixing the "use ...;" to H::T::Pro only

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-02 14:55:55 -06:00
8c09bc26db Tidying. Properly commenting javascript in some search includes. Standardizing markup in tools and labels. Correction to date function in label-item-search.pl (Thanks Joe)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-09 13:46:38 -06:00
paul
a5bd240321 FIX for Date calculation
Rule :
- always format_date() before sending date to template
- always format_date_in_iso immediatly after reading a date coming from a parameter
- deal internally only with dates in iso

Note that :
- I could not test things related to issues stats due to the my DB -issues.issuedate not filled, see commit about 3.00.00.006
- acquisitions_stats does not work when you filter on date

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-11 11:51:12 -05:00
Joshua Ferraro
e92f1d752c adding label manager sql
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-18 17:39:41 -05:00
Ryan Higgins
6e2564450e Adding labels generator.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-18 17:39:38 -05:00
Renamed from barcodes/label-item-search.pl (Browse further)