Bug 9116: Remove some useless tmp variables

Some variables are useless in C4::Items::PrepareItemrecordDisplay.

This patch removes its.

Test plan:
Syspref AcqCreateItem = "receive an order" and try to receive an order.
Check there is no regression.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9407: patrons search should match substrings

    If a patron lives at 4345 Library Rd, a search on Street Address for
    Library should find it. However, it does not, but a search for 4345
    Library does.  This patch adds a "Search Type" drop-down, defaulting
    to the current behaviour.

    To test:
    1) Search for a patron based on a non-leading part of a field.
    2) Should return no results.
    3) Search again with "Search Type" of "Contains".
    4) Should return the patron.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9281: FIX add an order from a staged file

In GetMember the hash parameter contained
'C4::Members' => 'borrowernumber'
XXX => undef

Test plan:
In the acquition module, try to add an order to a basket from a staged file.
Without this patch, you get an error:
  DBD::mysql::st execute failed: called with 2 bind variables when 1 are needed at /home/koha/src/C4/Members.pm line 559

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass, error only appearing in the log file.

Test plan:
1) Create a basket
2) Add one or multiple order lines using a staged file and the 'batch' feature.
   This is done by using the "Save" button at the bottom of the page instead
   of the "Add order" link next to a single entry.
3) Check your koha-error_log for the error above.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9280: FIX price calculation adding an order from a staged file

Test plan:
Add an order from a staged file containing a price value (010$d for
UNIMARC user).
Check this patch with 2 different vendors (listprice=1 and listprice=0).
Check the calculated price (depending discount and gstrate).

Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
introduces no new bugs
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I was unable to replicate the bug in MARC21, but the patch introduces
no regressions that I could find, so I am pushing it anyway.
Note: Acquisitions remains unusable under Plack. In order to test this
patch I first applied the patch on bug 9432.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9402: letter v between 2 option tags

In HTML code generated for advanced search, a useless "v" letter
is visible after "dissertation or thesis (revised)</option>".
This patch suppress "v" letter is outside <option> markup
(and cosmetic change : "Adult" -> "adult" in public types)

To test : check HTML code generated by advanced search.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes capitalization and a little problem in the HTML of an UNIMARC
plugin.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9211 - days_between wrong behaviour

As noted in comments #15, #16 and #17 of bug 8486, and its API,
Koha::Calendar->days_between should always returns a positive number
irrespective of the relative order of the parameters. This is still an
open bug, which arised when rewriting the Calendar.t file (Bug 9209).

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Added Paul's sign-off line, as despite it showing up in Bugzilla, it
wasn't on the patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9486: t/Letters.t loads modules in wrong order

Because the unit test t/Letters.t loads C4::Letters before C4::Context,
and C4::Letters is not even vaguely thread-safe, the test tends to fail.
Usually. Moving the dbh mocking to before the use_ok('C4::Letters') test
fixes the problem.

To test:
1) Before applying patch, run `prove t/Letters.t` a few times. Note that
   it fails most of the time, if not all the time.
2) Apply patch.
3) Repeat step (1), noting that now it passes every time.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as advertised.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9497 - Make it easier to add new encodings for Z39.50 servers and add ISO 8859-1

This patch does three things:
- Makes admin/z3950servers.pl create one variable for encoding,
  not one variable for each encoding
- Makes the template create encoding options from a list
- Adds ISO 8859-1 to the list of available encodings
See the bug for a lengthier description

To test:
- Apply the patch
- Edit one Z39.50 server several times, choosing each available
  encoding in turn
- Check that for each encoding, the correct encoding is shown both in
  the list of Z39.50 servers and in the dropdown on the edit screen

Comment: Works as described, no errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9174: Fix itemtype image display in OPAC lists

Prior to this patch, C4::VirtualShelves::Page did not make sure that
the itemtype images that it chose when displaying itemtype images for
biblio-level itemtypes were for the correct interface, so
even on the OPAC the Intranet icons were requested. On standard
installations, intranet-tmpl is not available to the OPAC.

To test:
1) Set noItemTypeImages to "Show" and item-level_items to "biblio record"
2) Create a list and add an item with the default item type (942$c in
   MARC21) set to something with an itemtype image associated with it.
3) View the list in the OPAC.
4) If you are an a standard install, the itemtype image will be a broken
   link. If on a dev install, you can confirm with Firebug or the like
   that the image is pulled from /intranet-tmpl.
5) Apply patch.
6) Run `prove t/db_dependent/Koha.t` to confirm that the behavior of the
   routine used to retrieve the image URL is correct. (Note that you
   must have an item type with the code 'BK')
7) Refresh the list, noting that the display is now correct/the image is
   pulled from opac-tmpl.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It works as expected. All tests in Koha.t passed.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9174 follow-up: Eliminate warning and fix POD

Thanks to Marcel for spotting these issues.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8942 : Adding a test to make sure we don't use single quotes for js
Bug 8108 [Follow-up, revised] Remove unused OPAC images

This patch cleans up some loose ends:

- Star ratings images are now in one sprite. Removing
  separate star ratings images.
- Amazon ratings have been removed. Related image files
  are removed by this patch.
- The tag images associated with tag links on the search
  results page were not incorporated into the main sprite.
  Now they are.

Added: The Photoshop file from which the main sprite was
generated, in case that is helpful to others. Each layer
is named, and comments have been added to the CSS
referencing the layer names. The file is GIMP-compatible.

Revisions:
- Rebased on current master
- Ported some changes to CCSR theme
- Removed unused CSS which referred to deleted images

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9494: update default LOC z39.50 target settings

This patch updates the seed data from the target list at
http://www.loc.gov/z3950/lcserver.html#addr.

Comment: new target works. updated deleting and reloading
sample targets.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
I agree with Galen that this may need to be incorproated as a follow-up
for current installations. Works fine for new installs
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9382 - updating permission labels

first, replicate:
go to More -> permissions on any user. Notice that it says various things "privileges, flags, permissions" they are interchangeable and inconsistent.
also note that some of the permissions are nonsensical and/or not descriptive enough, or not using canonical terminology (borrowers instead of patrons, for example)

To test:
interface consistency changes

-> means "turns into"

- page title - privileges -> permissions
- breadcrumbs - privileges -> permissions
- headings - privileges -> permissions
- "set flags" button -> save

Permissions that have changed description:

- Catalogue changes to "Required for staff login" in bold (this was the original impetus for this boatload of changes)
- reports
- editauthorities
- management
- serials
- updatecharges
- circulate
- parameters
- borrowers
- tools
- staffaccess
- edit_patrons (only on updatedb, not on new db)

- Read through and make sure there are no typos, and that the descriptions seem to jive with what privileges the permission gives the user. Suggestions are, in fact, welcome.

- If you are feeling ambitious, go ahead and create a new, clean database and check the wording there as well - it should match what has been done in the db update.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested both with existing database and new database

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Tested with existing database.  Introduces no new mysql-isms.
Kudos for adding that syspref in bold, that got me when I first started with Koha
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 9382: Increment version number

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly

To Test:

* Go to Acquisitions - Manage Orders
* Search for a vendor
* Click New Basket.
* Fill required fields
* Press Save.
* Click on "From a new (empty) record"
* Type in title Private Oz, Author Patterson, James.
* Scan (or type) ISBN - 9781864711875.
* (If not scanning, PRESS ENTER HERE)
* Nothing should happen. Form should not be submitted, no error message
  should appear.

Sponsored by: Hauraki District Libraries, New Zealand

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan in Firefox and Chromium on Ubuntu.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9308 - logo-koha.png not transparent in ccsr theme

This patch will allow the koha logo to be transparent so you can change
the background color.

To test this please change the background color within the css.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9343: handles the new format of Debarred [3.10.x]

The debarred status in DB switched from a boolean to a date.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Correctly pulls debared flag instead of debarment date.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 9503 Correct name of parameter passed to parcel.pl

invoiceid was being passed as invoice causing GetInvoiceDetails
to silently fail and a system error downstream when
accessing the 'orders' element of the undefined invoice

Added an error message if GetInvoiceDetails called on undef

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9503: Followup remove unused parameters passed to parcel.pl

The booksellerid and datereceive parameters are useless.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>