Bug 7643 - Can't upload and import zipped file of patron images

Fixed problem with re-declaration of $filesuffix

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
patch pushed onto master directly, doesn't merge properly from
new/bug_7643 branch

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8175 - check logs error or displays incorrectly in details.pl

Changed "$item->{'materials'} ne ''" to
"defined($item->{'materials'}) && $item->{'materials'} =~ /\S/"
in if condition to prevent error when it is NULL, and to
properly capture the intent of printing if there is something
visible.

Cases tested include NULL, '0', '', ' ', and 'blah' by using
 UPDATE items SET materials=NULL where biblionumber=19158;
where the biblionumber was chosen randomly, because only NULL
was in the items.materials field. The NULL case triggers an
error, but it does display correctly.

The ' ' case displays an apparently empty column, which does not
seem to be the intent of the flag that is being set. This is why
a simple $var check is not sufficient.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8863: When clearing a patron attribute, they are all cleared

Signed-off-by: Marc Veron <veron@veron.ch>

Tested with a set of 2 additional patron attributes. Cleard both before applying the patch.
Cleared as expected after applying the patch.

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

Conflicts:

	koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8869 - Duplicate member check doesn't disable submit button on bottom.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I confirm that after applying this patch, the submit button is removed from
patron edit page, avoiding accidentaly clicking on it, without responding to
the question about possible duplicate patron?

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8793 - Fix materialTypeCode/typeOf008 icons for NORMARC XSLT

This patch fixes some issues with icons related to materialtypes in NORMARC:

Remove references to opac-tmpl in the *intranet* NORMARC XSLT files.

Add two new icons to koha-tmpl/intranet-tmpl/prog/img/famfamfam/ and
koha-tmpl/opac-tmpl/lib/famfamfam/
GR.png - Graphical materials
TD.png - Three dimentional objects

Copy PR.png from koha-tmpl/intranet-tmpl/prog/img/famfamfam/ to
koha-tmpl/opac-tmpl/lib/famfamfam/

Rename the XSLT variable materialTypeCode to typeOf008 for increased consistency
between stylesheets.

Make sure the XSLT uses icons that are actually available.

To test:
- No use testing all the different permutations of leader pos. 06 and 019b, I think.
- Set marcflavour = NORMARC and turn on default XSLT for OPAC and Intranet, details
  and results.
- Make sure you have a record with something relevant in leader position 6, like
  g for movies or c for music
- Check that the icon turns up in results and details, in the OPAC and Intranet
- Toggle DisplayOPACiconsXSLT and check that the results in the OPAC are as expected

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Conflicts:

	koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl
	koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACResults.xsl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8873 - JavaScript error in Opac displaying tag cloud

On master (3.09.00.060), I get a JavaScript error on line 126 in opac-tags.pl while displaying tags cloud.

Reason: There are two lines with closing });

Patch removes one line.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8791: OPAC UNIMARC XSLT details: subject with subfield 3

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I can reproduce the bug, and confirm that this patch fix it. The issue arises
when $9 come first, and then $3, which is not that usual.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 3652: close XSS vulnerabilities on biblionumber and authid

Previously we did not sanitize biblionumber and authids passed in by
the user.

To test:
1) Go to /cgi-bin/koha/opac-detail.pl?biblionumber=2hi (substituting a
   valid biblionumber for the 2).
2) Notice the presence of "2hi" on this page, and also on the ISBD and
   MARC views.
3) Go to /cgi-bin/koha/opac-authoritiesdetail.pl?authid=2bye
   (substituting a valid authid for the 2).
4) Notice the presence of "2bye" on this page.
3) Apply patch.
4) Notice that "2hi" and "2bye" strings are gone.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 3652: close XSS vulnerabilities in opac-export

The opac-export.pl script had a number of XSS vulnerabilities relating
to its error handling.

To test:
1) Go to /cgi-bin/koha/opac-export.pl?op=export&bib=2&format=<h2>evil</h2>
   (substituting a valid biblionumber for the '2')
2) Notice that "evil" is rendered as an h2 heading.
3) Apply patch.
4) Notice that you now see the h2 tags, and they are not rendered by
   the browser.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
bug 3652 fixing XSS vulnerabilities in opac-search

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adding release notes
3.8.6 Translation Update
Merge remote-tracking branch 'tamil/3.8.6-translate' into 3.8.x