Bug 9247 - Add two more usage examples to the manpage for koha-mysql

It might not be immediately obvious that it is possible to send
SQL queries "directly" to the koha-mysql command, or that files
from mysqldump can be loaded with it. This patch adds these as
"example usage" to the man page for koha-mysql.

To test:

Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-mysql.xml
$ man -l koha-mysql.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

This patch also corrects a couple places where "Koha" was written as "koha".

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan, all tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10593: make AuthoritiesLog default to yes

This trivial patch set the default to 'yes' for this system preference.
To test,
On a clean install
- Navigate Home > Administration > Global System preferences > Logs
- AuthoritiesLog is set to "Don't log"
Apply the patch, install koha on a new DB.
- Navigate Home > Administration > Global System preferences > Logs
- AuthoritiesLog should be set to "Log"

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line patch, changing the default for new installations only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10587: fix HTML errors on authority detail page in OPAC

A validator check of the OPAC's authority detail returns a few minor
errors. This patch corrects the errors.

To test, apply the patch and run an OPAC authority detail page through
an HTML validator. There should be no errors which are specific to the
authorities detail template (as opposed to header and footer includes).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Also checked using the W3C validator and testing the
authority detail page in the OPAC is still correctly
displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6594: Schema.org structured data for OPAC display

To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Comments on final patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6594: Move subject keywords schema.org markup into <span> element

Google's rich snippets tool gets confused by the <a property="keywords">
approach, so stuff another span inside the <a> element to remove
confusion with the href attribute.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6594: Correct schema.org context for item status

We were inserting the <link> element inside an open <td> element, which
HTML parsers, even the most forgiving, do not like very much.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6594: Schema.org span nesting improvements

So, it turns out that the <a href> was causing a new "chain" to be
invoked, thus nesting the <span> elements for properties within the <a
href> actually caused the properties to be attached to that new chain
rather than the containing object. Therefore, wrap the <span> elements
around the <a href> elements where applicable.

Thanks to Manu Sporny in #rdfa for helping me to sort this out.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I tested by validating against the Google rich snippet tool,
validator.nu, and linter.structured-data.org. All were satisfied
with the microdata markup, and the properties that are set make
sense.

These patches are only for MARC21 XSLT view, but I think it is worth
pushing them even without the NORMARC and UNIMARC markup, so that
people can start to test out schema.org microdata in Koha, and
refine the implementation.

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

FWIW I agree with Jared, it is essentially a no-op in terms of what
the user sees, so is safe.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10130: widen input fields for library configuration

Most input fields in the library entry form (admin/branches.pl) have no
explicit width, so they display with a browser-default width. This patch
gives explicit widths to those fields, giving more room for entry.

Other fields have been given an explicit width and/or maxwidth according
to the database table structure.

To test, add or edit a library in Administration -> Libraries and
Groups. Form fields should be more comfortable for entry, and add/edit
actions should complete correctly.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only, works nicely.
Tested editing and adding libraries in administration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10690 - Warn about trailing slashes in description of OPACBaseURL and staffClientBaseURL

The descriptions for OPACBaseURL and staffClientBaseURL are not explicit
about including a trailing slash or not. This patch makes it explicit
that the trailing slash should *not* be included.

To test:
- Apply the patch
- Search for "baseurl" in the system preferences
- Check that the description of both sysprefs includes a warning about
  not including a trailing slash.
- Sign off

If you want to check that the trailing slash is in fact superfluous you
can do something like 'grep -r "BaseURL" *' and check that these
sysprefs are usually concatenated with some string that starts with a
slash.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes to the description appear correctly on both system
preferences.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10508: add unit tests for C4::Branch

Unit tests are wrap in a transaction.

To test:
prove t/db_dependent/Branch.t
t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207.
t/db_dependent/Branch.t .. ok
All tests successful.
Files=1, Tests=36,  1 wallclock secs ( 0.02 usr  0.02 sys +  0.13 cusr  0.01 csys =  0.18 CPU)
Result: PASS

http://bugs.koha-community.org/show_bug.cgi?id=10508
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10508: (follow-up) fix a typo

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for the follow-up Chris!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10508: (follow-up) remove Perl 5.14 construct

Also added parentheses to bare function calls.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10629: remove inappropriate uses of $sth->finish() in C4::Branch

Test plan :
Check if the regression tests still works
prove t/db_dependent/Branch.t
t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207.
t/db_dependent/Branch.t .. ok
All tests successful.
Files=1, Tests=36,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.12 cusr  0.00 csys =  0.16 CPU)
Result: PASS

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

From the man page

finsh()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10767: add unit tests for C4::Circulation routines that use issuingrules

The test are wrap in a transaction.

To test:
prove t/db_dependent/Circulation_Issuingrule.t
t/db_dependent/Circulation_Issuingrule.t .. ok
All tests successful.
Files=1, Tests=9, 17 wallclock secs ( 0.02 usr  0.00 sys +  0.34 cusr  0.04 csys =  0.40 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No koha-qa errors
prove t/db_dependent/Circulation_Issuingrule.t run without errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10767: (follow-up) remove FIXME comments

The FIXME comments in the new test script were based on
an assumption that GetIssuingRules() should return
multiple rules if no or only partial parameters are
passed.  This is not the intent of that routine, whose
purpose is to return the *singular* rule that best
applies to a given loan situation.  In other words,
GetIssuingRule() is not a traditional accessor function.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10710: add unit tests for OfflineOperation's routines in C4/Circulation.pm

This patch test AddOfflineOperation,GetOfflineOperation and
DeleteOfflineOperation in C4/Circulation.pm.

The tests are wrapped in a transaction.

Note: Currently, GetOfflineOperations is not tested because we cannot
mock C4::Context->userenv in unit tests

To test:

prove t/db_dependent/Circulation_OfflineOperation.t
t/db_dependent/Circulation_OfflineOperation.t .. ok
All tests successful.
Files=1, Tests=7, 19 wallclock secs ( 0.01 usr  0.01 sys +  0.33 cusr  0.02 csys =  0.37 CPU

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10710: (follow-up) perltidy new code

Also, I prefer the use of parentheses for function
calls, even when no arguments are being passed.
One missed comma turns

is(GetOfflineOperation, ...)

into

is(GetOfflineOperation ...)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10566 - Improve OPAC course reserves pages

This patch makes various improvements to the OPAC course reserve pages:

- Descriptive page titles for both pages.
- More compact display of course information on course detail page
  (a list instead of a table, consistent with other displays of similar
  information in Koha).
- Correct capitalization.
- Added label and fieldset to course reserve search form.
- Added breadcrumb navigation to course reserve detail page as a path
  back to course reserves main page.

To test, apply the patch and confirm that the changes haven't broken
anything and are an improvement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and improves the display.
Tested with only 1 course, 2 courses,
courses with and without items selected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10566: (follow-up) fix HTML validation issues

These issues predated the previous patch, I just took
this chance to fix them.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10692: add unit tests for C4::Circulation routines about transfers

The tests are wrap in a transaction.

NOTE: Currently, some tests should pass but don't because of incoherences in the code.
These tests are in comments and preceded by FIXME.

To test:
prove t/db_dependent/Circulation_transfers.t
t/db_dependent/Circulation_transfers.t .. ok
All tests successful.
Files=1, Tests=12, 18 wallclock secs ( 0.02 usr  0.01 sys +  0.37 cusr  0.06 csys =  0.46 CPU)
Result: PASS

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>