Bug 10307 - z39.50 server search tab shows z390.50

The label on the global search form for Z39.50 administration reads
"Z390.50." This patch corrects the typo.

To test, apply the patch and navigate to Administration -> Z39.50
servers. The label on the global search tab should read "Search Z39.50
servers."

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10015 - UniqueItemFields could have link to database documentation

Other system preferences which require entry of database column names
include a link to the scheme for reference. The UniqueItemFields should
do the same. This patch rewords the preference description to
incorporate a link.

To test, open the acquisitions tab in system preferences and confirm
that the UniqueItemFields description looks correct and links to the
right page in the schema.

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7892: Open link to imported record in new tab

Change links to imported records to open in a new window/tab
on the staged records management page.

To test:
1) Go to Tools > Staged MARC record management
2) Open an imported batch by clicking on the file name
3) Click on bib# in the record column
4) Verify links open in a new window/tab now

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8584: cleanup_database.pl : Add a DAYS parameter for email purges.

You can now specify a number of days with the --mail parameter. Only
mails older than the specified number of days will be deleted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10249: Fix untranslatable strings in OPAC detail page

Star ratings feature:
- Your CGI session cookie is not current. Please refresh
  the page and try again.
- average rating:
- your rating:

Browse results feature:
- Click to rewind the list to
- See biblio
- with biblionumber
- by (between title and author)
- Click to forward the list to
- Go to detail

To test:
- Update the po file using 'perl translate update <langcode>'
- Translate all new strings, maybe mark them with XX to make it easier
  to find them
- Install the updated translation file using 'perl translate install
  <langcode>'
- Test the ratings and browse results features in the OPAC detail page
- Verify everything is still working/displaying like it should
- Check that you don't find any unstranslated strings/terms

Some hints where the changes are:
- Change an existing rating - the average and your rating will change
- Browse result list and check mouse over tooltips for all links

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Strings are now translated, and no emergent JS errors have revealed
themselves.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 766: remove CGI::scrolling_list from request.pl

Let the template take care of generating the display.
Lets at least part of request.pl be more succinct.

To test, place a hold and search for the patron using a partial name.
You should get a dropdown select list of patrons and be able to select
the patron to hold for from there.

The functionality should remain unimpaired after this patch is applied.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8600: can now remove search input fields in OPAC advanced search form

If you follow the 'More options' link in the OPAC
advanced search form, each search input field after
the first now has a '-' button that lets you remove
the box.  This complements the '+' buttons that
already existed that allow the user to add additional
input fields.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8600: (followup) remove debug logging statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9549: Show local cover images in the OPAC shelf browser

Add the ability to view local cover images in the shelf browser.

To test:
1. Add a local cover image to a record. Set OPACLocalCoverImages sys pref to "display."
2. Search for the record, go to the Details page, and click on Browse Shelf.
3. Verify that the local cover image appears in the shelf browser.

Sponsored-by: CCSR

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10413 - Odd space character breaks translation

This patch simply removes an odd space character that
breaks translation by adding a second msgid="" in PO files.
VI shows it as <U+2028>.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Small patch, removes invisible char. No errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7419: correct LCCN/see from indexing

This patch adds indexes for previous headings and LCCN for MARC21
authority records. See the following patch for a test plan to confirm
that the indexing works correctly.
Bug 7419: General-purpose record deduplicator

This patch adds a script for deduplicating records. It is most useful
for authority records but by design could be easily extended for use
with bibliographic records, if someone had a good use case.

To test using the sample records attached to the bug (MARC21 only):
1) Apply patches.
2) Import the sample records (sampleauths.mrc) file into Koha and
   make sure that they get indexed (by waiting until rebuild_zebra.pl
   runs automatically or by running rebuild_zebra.pl -a -z [-x] manually)
3) Deduplicate based on LCCN (replace {FIRSTAUTH} with the authid of the
   first imported record; on my system that number is 367123668; this is
   not actually necessary, but if you have a lot of authority records,
   the process could take quite a while otherwise):

   > misc/migration_tools/dedup_records.pl -t -v -a \
     -l "authid >= {FIRSTAUTH}" -r -m "lc-card/010a" -s date

4) Check that you have 21 duplicate records replaced from amongst the
   new records (you will quite possibly have more than 21 duplicate
   records reported, depending on whether you have any of these
   authorities already, but you should have at least the 21).
5) Deduplicate based on genre heading, preferring Library of Congress
   authorities to local authorities:

   > misc/migration_tools/dedup_records.pl -t -v -a \
     -l "authid >= {FIRSTAUTH}" -r -m "he/155a" -s "source=DLC" -s date

6) Check that you have 3 duplicate records replaced from amongst the new
   records.
7) Sign off.

Complete POD documentation:

SYNOPSIS
         dedup_records.pl --match=1 -a

         dedup_records.pl --match="LC-card-number/010a" --select="date" \
           --limit="authid > 367123592" -a

         dedup_records.pl --match="Match/100abcdefghijklmnopqrstuvwxyz" \
           --select="source=DLC" --select="date" \
           --limit="authtypecode='PERSO_NAME'" -a

DESCRIPTION
       This script will identify duplicate records, and either suggest
       that you merge them (in the case of bibliographic records) or
       automatically merge them for you (in the case of authority records).

OPTIONS
       --help  Prints this help

       -v|--verbose
               Print verbose log information (warning: very verbose!).

       -t|--test
               Do not actually make any changes to the database, just
               report what changes would be made.

       -r|--report
               Print a report of what happened during the run.

       -l|--limit=S
               Only process those records that match the user-specified
               WHERE clause (the WHERE is implied and should not be
               included on the command line).

       -a|--authorities
               Check for duplicate authorities rather that duplicate
               bibliographic records.

       -s|--select=s
               Repeatable. Specify how to identify which record to
               prefer. See the section on SELECTORS below.

       -m|--match=s
               Specifies the matching rule to use. This can be the
               numeric ID of a matching rule that you have already
               configured (preferred), or you can specify a matching
               rule on the command-line in the following format:

                   <index1>/<tag1><subfield1>[##<index2>/<tag2><subfield2>[##...]]

               Examples:

                   at/152b##he-main/2..a##he/2..bxyzt##ident/009@
                   authtype/152b##he-main,ext/2..a##he,ext/2..bxyz
                   sn,ne,st-numeric/001##authtype/152b##he-main,ext/2..a##he,ext/2..bxyz

       -c|--check=s
               Only relevant when you are using a matching rule
               specified on the command line. Specifies sanity checks to
               use to ensure that the records are really duplicate. The
               format is <tag1><subfields1>[,<tag2><subfields2>[,...]]

               Examples:

                   200abxyz will check subfields a,b,x,y,z of 200 fields
                   009@,152b will check 009 data and 152$b subfields

SELECTORS
       This script supports a number of selectors for choosing which
       record is "better."

       score   Prefer the record which is the best match based on the
               specified matching rule. This will probably only be
               useful in cases where the matching rule will not match
               the source record, since the source record will
               automatically be given a score of 2 * the matching rule
               threshold if it wasn't picked up by the matcher.

       date    Prefer the record which is newer based on the 005 field.

       source=ABC
               MARC21 only. Prefer records which come from ABC based on
               the 003 field.

       usage   Authorities only. Prefer the record used in the most
               bibliographic records.

       ppn     UNIMARC only. Prefer records which have a PPN in the 009
               field.