Bug 7924 - Fix handling of command line arguments in koha-remove

koha-remove would fail with a message like this:
Removing Koha instance --
ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'koha_--'@'%'

After fixing this, the --keep-mysql option made the script exit without doing
anything.

To test:

Alt 1
- Build package with build-git-snapshot
- Install package

Alt 2
- Replicate the changes in the patch in an existing installation

Then:
- Add instance1 and instance2
- koha-remove instance1
-- Check that script completes and the databse is gone
- koha-remove --keep-mysql instance2
-- Check that the script completes but the database is not removed

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Cherry-picked to 3.6.x prior to inclusion in Master because this is required for
the release build.
Update 3.6.x release notes template

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7824 - [3.6.x] show the first name correctly in the OPAC user update screen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Paron's name on 'my personal details' tab shows correctly after
applying the patch.
Revert "Bug 7837 - nb-NO z3950servers.sql misses column names"

This reverts commit f1d92920e102d1a6d1a77613f3adeae01d0dff48.

Thanks to Katrin Fischer to pointing out that this patch should not have been
cherry-picked to 3.6.x.
Revert "Bug 7699: Restricted until datepicker broken"

This reverts commit fc6a6da31df374ba61b81e42941aaf1a7d27125a.

Thanks to Katrin Fischer to pointing out that this patch should not have been
cherry-picked to 3.6.x.
Bug 7272 setting NULL to debarred field, to avoid having 0000-00-00

0000-00-00 can come only from a problem in the 3.06.00.001 update

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 5543 - Date ISO format wrong separator

This patch converts the changes in Fridolyn SOMERS patch
to T:T and adds an update to the database to correct
the description there.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7540 [3.6.x] - add id values to the legends in the patron entry form

This adds the following IDs to the legends in the patron entry form:
 main_address_lgd contact_lgd alt_address_lgd alt_contact_lgd
 library_management_lgd library_setup_lgd opac_staff_login_lgd
 patron_messaging_prefs_lgd

With these in place, then jquery like:
$(document).ready(function(){
        $('#main_address_lgd').text('Postal Address');
        $('#alt_address_lgd').text('Residential Address');
});
in intranetuserjs can be used to rename things to taste.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 6496 - tidy the display of 710 fields on XSLT

This puts '--' between 710$b fields, and replaces the '.' with a '; ' if
there are additional authors.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 6496 - correct the order of the author display in the OPAC

This sets the order the fields are displayed in to be as it is in the
MARC (typically numerical order), rather than 100,700,110,710,... like
it was.

Basically, it's a port of the way it's done in the staff client. As
such, it should be able to handle a lot more than it could previously,
including relator codes.

(replaces the previous commit, just removing an erronious comment and
making the commit message more accurate)

Conflicts:

	koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry-picked from commit 39def35275c3f2fa8eb4468e97b4c445e1f605fb)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7496 - Personally identifying information sent in opac user TITLE

Removing patron name from OPAC page <title> tags. Making
some other minor changes to improve <title> clarity and consistency.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
titles appear to be consistent
passes prove xt

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7513 Marc Import Hangs

On some record, the commit_biblio_file is creating wide
character
because as_xml is not used with correct parameter.
This patch fixes that.
To test on a UNIMARC Koha, stage attachment 7510 and
then import.
It hangs before the patch, it passes after.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 5373 - allow 'cardnumber' to appear on the patron import field list

For some reason, it was explicitly removed, however you need it if you
want to match up on cardnumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Easy to test and works nicely.
Before patch cardnumber is not shown in the list of fields on the
patron import page. After applying the patch it is.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7454 Initialize return arrays in ILS/Transaction/RenewAll

Explicitly clear these arrays and update them directly.
In practice item numbers were already in them when called
so that more items were being returned than were actually
renewed (or failed)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Functionally sound patch, and tested in production

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7460: followup : Add template toolkit's FILTER html_line_break on staff details description's tab

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 3916 [follow-up] : Adding a default choice in every dropdown list, not only branches, to let the corresponding value unchanged

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Patch works as advertised

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7558: Serial issue note doubled up in full history

Removes the note behind the status, because there is a separate column.

To test:
- Add a subscription
- Receive an issue, add a note for it
- Search record in OPAC and check the full history tab for the note

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
7453 Followup for borrower without expiry date

While it should be impossible now to have a patron without expiry date, I still had one. It does not hurt to add a simple check on expiry date defined before calling delta days on null values and breaking the opac login.
Trivial change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested by deleting the expirydate from my own patron record.
Missing expiry date now no longer breaks the summary page
in the patron account on OPAC.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 7579 - Icons for authorized values/item types not showing in OPAC

The functions getitemtypeimagedir and getitemtypeimagesrc
in Koha.pm were using the system preference 'template'
when they should be using 'opacthemes' instead.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>