Bug 8532 - improve robustness when converting dates

If undef is passed to the date format conversion function, it dies. This
can happen when you have old data in the database. Better to handle it
in some fashion rather than die, so now it just returns undef too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I replace "return undef" with just "return" to pass perlcritic

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8590 - checked out from missing on patron detail

Adding back the line in the script which pulls the name
of the branch where the item was checked out.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8572: invalid auth shouldn't cause error

Prior to this patch, attempting to view an invalid authority in the
OPAC gave a system error instead of a 404. With this patch, the user
will just get a 404, as is the case with invalid bibs.

To test:
1) Try to view an invalid authority by going to:
   /cgi-bin/koha/opac-authoritiesdetail.pl?authid=999999999999
   (presuming that you don't have an authority with authid 999999999999
   in your database) before and after applying this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8440: Dates does not appear in suggestions management

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8419 - Suspended holds appear on the daily holds queue

Suspended holds are showing up in both the holds queue and holds to pull reports.

This patch adds to the sql queries such that any hold that is suspended
is not selected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8172 - Missing dereference marker for buildQuery parameter in addbooks.pl Added a dereference to an array parameter of buildQuery.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8172: Followup: Removes useless empty params

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8575: Expected items count should not include cancelled orders

To test:
  1/ create a new basket with 2 orders, one with 1 item, another with 2
     items
  2/ look at booksellers.pl page, you should see that 3 items are
     expected
  3/ cancel the order with 1 item
  4/ refresh booksellers.pl page, it should remains 2 expected items

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

Works exactly as designed

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8576: Software error on authority edition when using merge

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8162: allow packages to work on Ubuntu Precise

The newer version of MySQL in Ubuntu 12.04 installs a default
'localhost' user with no username. Due to the way that MySQL looks up
user details when you connect, if you connect from localhost and the
user was only created with a wildcard host (%), the anonymous localhost
user will be found instead. This means that your username is lost for
the connection, and you have no privileges.

This patch creates a second user with a hostname of 'localhost'. This
will not work if your database is on a remote server, but you probably
know what you are doing if that's the case. Patches to determine this
server's name relative to the MySQL server are welcome (or even ideas on
how to do it.)

It also fixes up a couple of other small things:
* make koha-remove stop zebra properly
* stop the warning that the password file is missing on create

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

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Allows 3.8.4 packages to work on Ubuntu 12.04
Bug 8329 - GetLostItems in C4::Items.pm has a SELECT * Provided a smaller list based on reports/itemlost.tt

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8513: OPAC detail page broken with XSLT

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8514 Restore Patron Name Display Order

Bug 6303 introduced an include file governing patron name display
unfortunately that changed patron display in search result lists and
on the circ screen header. This adds a parameter restroring the
original surname, firstname order, whose absence was perceived
as a loss of functionality

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8550: Z39.50 searches for ISBN/ISSN problematic

Rather than treating ISBN and ISSN as the same, this patch breaks
them out into separate parts of the query, as well as changing
the truncation attribute to enable right truncation (the correct
behavior for the ISBN field in MARC21, and valid behavior in
UNIMARC).

Signed-off-by: Joseph Alway <jbalway@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8522 - Markup errors cause problems with customized CSS

Some includes and templates contained duplicate "header" ids in
the markup. The problem should have come up in routine page
validation, but was obvious when custom CSS was applied.

To test, load any of the affected pages and validate the
generated HTML. There should be no errors about 'ID "header"
already defined." Or, add custom CSS to intranetusercss:

...and confirm that only the topmost menu background is affected.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8573 - Translation difficult in picture-upload.tt due to nested sentence in if/foreach/if/elsif - construction

Text could not be correctly translated due to poor parsing of nested sentences in Pootle.

*Sentences de-nested to have whole sentence in each if /elsif branch
*Cleaned up <li></li> handling: moved closing </li> outside the for each loop to prevent orphaned closing </li>s.
*Changed indentation for better readibility
*Changed WARNING to ERROR because it is an *Error* during upload.
*Wording simplified (for translation).
*In one case added hint to refer to online help (size).

This way text should be easier to be translated in Pootle.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8586: Small bug in die if no mapping in framework for biblioitems.biblioitemnumber

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8357: UNIMARCslim2OPACDetail.xsl, title without class and too links to views

Signed-off-by: Zeno Tajoli <tajoli@cilea.it>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8556 - "Mark seen and continue" not translatable in inventory.tt

Added missing _(...) wrapper in JavaScript in inventory.tt
Additionaly added two blanks to separate buttons (were sticked together without white space)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 6617: Improve MARC21 enhanced contents display

The display of "Enhanced" 505 (contents) fields in the MARC21
XSLT is very poor, resulting in large, unreadable blocks of text,
and -- for some series -- so much unnecessary duplication in the
Notes tab that important information is entirely obscured. This
patch reformats "enhanced" contents fields (MARC21 505 fields with
$t and $r) so as to be more readable by breaking up entries on
separate lines and making titles bold (to make them stand out more).

This patch does not address duplication of information in the Notes
tab, per discussion on the #koha IRC channel.

To test:
1) View record with enhanced 505 field before applying patch. Observe
   it is very unfriendly.
2) Apply patch.
3) View same record, note that display is much improved.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

This first patch works as advertised. It formats the table of
contents on the opac detail display in a cleaner format.

I recommend that future follow ups fix the staff client to match
and update the title notes tabs on the opac and staff client
to also match the cleaner format for table of contents.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>