Bug 11249: Add Db indexes on borrowers names

The borrowers search is by default on columns surname, firstname,
othernames and cardnumber.

(See C4::Members::_express_member_find).

Adding DB indexes will really increase the query speed.

This patch adds DB indexes on surname, firstname, othernames (cardnumber
has already an index).

Those indexes must be defined with a size because columns are mediumtext.

Test plan :
Test with mysql client :
mysql> explain select * from borrowers where surname like 'A%';
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
| id | select_type | table     | type  | possible_keys | key         | key_len | ref  | rows | Extra       |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
|  1 | SIMPLE      | borrowers | range | surname_idx   | surname_idx | 767     | NULL |  395 | Using where |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
=> key show the index is used

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, changes from updatedatabase and in kohastructure match.
I think deletedborrowers can be left out, as it's not queried when doing
patron searches. Patron deletes still work as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11249: DBRev 3.15.00.006

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7518: regression test double-quote in search operand

Under certain circumstances, namely where QueryParser is off,
QueryWeightFields is on, and QueryFuzzy and QueryAutoTruncate are
off, a search with a double-quote embedded in it can fail: for
example

    web application

would return results where

    web "application

does not.

This patch adds an automated regression test.

To test:

[1] Apply this patch and run prove -v t/db_dependent/Search.t;
    two tests should fail.
[2] After applying the main patch that fixes the bug, the
    prove -v  t/db_dependent/Search.t should succeed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7518: certain searches with quotation marks don't work

Under certain circumstance, a search term without quotation marks
returns the expected results while the same search with a
double quote embedded in it would fail.

Koha should ignore the quotation marks and return results anyway.

This appears when  QueryWeightFields syspref is activated (and
QueryAutoTruncate is off), as field weighting builds a complex CCL
query using double quotes around search words.  This patch simply
replaces double quotes in search words by a space.

Test plan :
- Set QueryAutoTruncate off (you may also need to set QueryFuzzy to off)
- Set QueryWeightFields off
- Perform a serch on two words where you have results, like : centre "ville
=> you get results
- Set QueryWeightFields on
- Perform same serch
=> you get the same results

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9807 : Make it possible to view a basket group without reopening it

This patch make possible to view an individual closed basket group

without reopening it.
- It adds a new "View" button on closed basket group list
- It creates a view for closed basket groups, with 3 buttons (reopen,
  print, export)
- It adds a "delete" button on standard "edit" view (for open
  basket groups)

To test :
1/ regression test :
- create some empty basket groups
- create some basket groups by closing baskets
- in the list of basket groups closed and opened, check you can use
  the buttons that existed before the patch (close and print, delete,
  export, print, reopen)
- click on "Edit" to edit a opened basket group : check everything is
  like before :
-- change the billing and delivery places,
-- add a note,
-- put some new baskets  in the bg,
-- remove baskets from it
-- save it without checking "close" box => it should be saved but kept
   open
-- edit it again, and make other some changes (define a freetext
   delivery place for example)
-- save it with checking "close" => it should be saved but closed

2/ new feature test
- click on "view" button on top right column of some closed basket group
- check all the displayed informations are correct (places, free place,
  note, list of baskets)
- check you can not change anything
- click on "print" button => check a pdf is created
- click on "export" button => check a csv is created
- click on "reopen" button => you should stay on the same basket group, but
  it is now open and you can make some changes
- go back to the basket group list of the vendor. Check the reopened bg
   is in "open" tab
- click on "edit"
- click on new "delete" button => the bg should be deleted, and you are
  redirected to the bg list of the vendor.

Signed-off-by: cedric.vita@dracenie.com <cedric.vita@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, t and xt. Works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9807: (follow-up) fix variable name

Fixing closedbg name in template

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9807: (follow-up) reindent basketgroup.tt

Basketgroup.tt is very hard to read. This patch simply reindents it.
No visible changes expected

Regression test :
- check the list of opened and closed basketgroups for a vendor is
  displayed properly
- check an individual basketgroup (closed and opened) is displayed
  properly
- check you can edit a basketgroup and save changes
- check you can print and export a basketgroup
- check you can close and reopen a basketgroup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9807: (follow-up) quell warning if invoice price not set

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Translation update - split staff UI and help files
Merge branch '3.16-help-split' of https://github.com/bgkriegel/koha-translate