Bug 5327 follow-up: add DBD::Mock dependency

In order for the awesome new t/ItemType.t test to work, we need
DBD::Mock.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Bug 5327 : Added a few more lines of code to the ItemType.t unit test

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Bug 5327 Tests for C4::Matcher

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Added and tested a mock-db tested a couple of features

http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Added a mock-db table and tested a line

http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Added tests to installer_perlmodules

http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Bug 5327 : Fixing a typo in the test that was causing a false fail

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
t/db_dependent/Items.t was failing despite valid data before patch,
works fine after
Bug 5327: Unit tests for C4 socialdata

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 5327: Testing c4 Images

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
tested the 9 previous patches, that introduces many new unit tests using
the Mock Module.
Bug 8206: Specify index in OPAC authority search

Adds a dropdown to allow the user to choose to search the 'mainentry,'
and 'match-heading'indexes, in addition to the 'any' index which is
the default.

To test (you will need authority records with see-from and
see-also headings):
1. Go to the browse subjects and authors section in the OPAC
2. Do a search for a fairly generic term that is used as a
   see-also term in a lot of records. Note that your search
   results include both the record that you wanted and all
   the other records that refer to it.
3. Apply the patch.
4. Repeat the search from step 2. Notice there is no change
   to the results.
5. Repeat the search from step 2, but choose "in main entry"
   and observe that you are now only seeing authority records
   with the search entered in their main entry.
6. Repeat the search from step 2, but choose "in any heading"
   and observe that the results are the same as in step 2. This
   is intentional, so that in the future notes in authorities
   can be made searchable.
7. Search for an obsolete form of heading with the "in keyword"
   option selected. Notice what results you get.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely. Hiding the new options can be done with CSS:

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 8206 follow-up: Add Match index to MARC21 record.abs

Although the Match index was correctly configured for UNIMARC
authorities and MARC21 authorities indexed with DOM, the Match
index was inadvertantly removed from the record.abs file for
MARC21 authorities at some point. Since the Match index is required
to make best use of the new search options, this patch adds it
back in.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 8206: make authority search indexes consistent

This commit makes the search indexes used for search authorities in the
staff client and OPAC more consistent by using the Mainentry,
Match, and Any indexes for both, and adjusting the labels so that they
correctly describe what the indexes do.

Note that the Match index was chosen instead of the Match-heading index
because Match-heading has the additional attribute of being for phrase
searches and exact matches, whereas Match is used for keyword matching,
and is more applicable with GRS-1 indexed records (thanks to the
well-known limitations of GRS-1 and exact matching of headings).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
No problem detected in UNIMARC
Bug 8089: Use Koha::Cache for all caching

1. Replace all instances of memoize_memcached with appropriate calls
into Koha::Cache:
* reports/guided_reports.pl
* C4::Biblio::GetMarcStructure
* C4::Languages::getFrameworkLanguages
* C4::Languages::getAllLanguages
* C4::SQLHelper::GetPrimaryKeys
* C4::SQLHelper::_get_columns

2. Replace all references to memcached with the appropriate calls into
Koha::Cache in C4::Context.

Test plan :
* have DEBUG env set to 1
* reach addbiblio page to test the patch in Biblio.pm, or setup more than 1
  language
* you should see in the logs that you're reading and writing from cache
* run the test suite twice both with and without the following environment
  variables set:
export MEMCACHED_SERVERS=127.0.0.1:11211
export MEMCACHED_NAMESPACE=KOHA
export CACHING_SYSTEM=memcached

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

I'm unsure about some of the caching times 10000 is a long long time,
but other than that, works fine.
Bug 8089: Cache sysprefs using Koha::Cache

Cache sysprefs using Koha::Cache in a way that is safe even for
caching-related sysprefs. This lays the groundwork for removing
caching configuration from the httpd.conf and configuring it
using sysprefs.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8089: Correct cache timeout to 1000

There was a typo in the original patch for bug 8089 which set the cache
timeout on getAllLanguages to 10000. Correct it to 1000.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8204 follow-up: don't display OpacNav on auth details

Based on the way we handle the bib details page, it seems we should
not be displaying OpacNav on the authority details pages on the OPAC.
This patch removes them.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Merge remote-tracking branch 'origin/new/bug_8204'
Bug 8678: XSLT stylesheets output XML, but HTML is needed

Because we are embedding the results of XSLT stylesheets in HTML, we
need to output HTML instead of XML. Outputting XML results in
non-standard-compliant (or at least non-Firefox-compliant) markup.

To test:
View a variety of XSLT-rendered pages on the OPAC and intranet, and
confirm that all look as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8408 - Followup - Fix broken messages.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 8408 - Followup 2 - Add reference to renewing items.

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