Commit graph

20641 commits

Author SHA1 Message Date
Jonathan Druart
4bd730d4c2 Bug 11018: allow adding order from a reverted MARC batch
Weird behavior:
When an import is undone into catalog, the status is set to "reverted".
But if you open the add orders from iso2709, the status is automatically
set to "imported" and does not appear in the list.
So it is not possible to import a reverted batch.

[RM note: since a reverted batch is nonetheless a staged batch, and
could be reused, allowing orders to be placed by taking bibs
from a reverted batch is not as odd as it might sound.  It *can* look
odd for a staged or reverted batch to contain records that are
imported, but that's a long-standing oddity.]

Test plan:
- verify you reproduce the weird behavior
- apply this patch
- import a file and the batch into the catalog
- verify (in the your mysql/MariaDB cli) the status is "imported"
- verify it does not appears in the add orders from iso2809 page
- undo the import
- verify (in the your mysql/MariaDB cli) the status is "reverted"
- verify it appears in the add orders from iso2809 page and the status
  is always "reverted"
- finish the order

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:32:42 +00:00
Galen Charlton
a776c77640 Bug 9788: (follow-up) update the bootstrap theme
This patch applies the change made in the QA follow-up
to the Bootstrap theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:21:07 +00:00
d211fa50ed Bug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber
Adds three tests to Reserves.t for GetReservesFromItemnumber.
We test if this routine does not return a future next available hold,
a future item level hold. And if it does return a future wait (that is:
a confirmed future hold, using ConfirmFutureHolds).

Note that Holds.t does also contains some basic tests for this routine,
but the additional tests seem to better located in the direct context of
tests for bug 9761 for ConfirmFutureHolds.

Test plan:
Run both t/db_dependent/Holds.t and t/db_dependent/Reserves.t.
Verify if both tests do not fail.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:11:48 +00:00
Jonathan Druart
38edd714c5 Bug 9788: QA followup
1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:10:42 +00:00
a23d4181b1 Bug 9788: (follow-up) for expirationdate in Letter.pm
Pasting comment from the Bugzilla report:

Looking bit longer at this code, it is kind of strange to find it
there in the first place. Adding maxpickupdelay in Letters.pm should
not be there, but it is..

Also this date is not used normally in the default HOLD Available for
Pickup notice (that we are generating in this case). And if it would be
undef, the expiration date should imo be empty instead of today+0.
(before adding maxreservespickupdelay, you should test the allowexpire
pref first) So it is an (invisible) bug on its own.

Test plan:
See former patch. Kyle just discovered this bug, apparently by
deleting the maxpickupdelay pref..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:08:39 +00:00
92be11bbcf Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:07:32 +00:00
1a9737be76 Bug 9788: Improvements when calling GetReservesFromItemnumber
This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.

Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.

This patch builds on work from reports 9367 and 9761.

Test plan:

Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-17 05:06:01 +00:00
Galen Charlton
e686dd2543 Bug 10987: (follow-up) fix display of authorities containing only one see from or see also lnik
This patch fixes an incorrect test on the number of see from and
see also links in the authority record, as otherwise if a record
had only one 4XX or 5XX, the linked headings weren't displayed at
all.  This patch also makes the test consistent across the staff
theme and the two OPAC themes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 23:07:09 +00:00
910dff2825 Bug 10987: remove duplicate 'see also' and 'see from' labels from authority search results
If an authority record has more than one 4xx$a (or 5xx$a) entries the
corresponding labels 'see also' and 'used for/see from' werwe repeated.
This patch removes duplicate instances of the labels, improving
readability.

To test:
- Have authority records with more than one entry on the 4xx (or 5xx)
  fields.
- Do a search, check "see also:" (or 'used for/see from') appear more
  than once.
- Apply the patch
- Reload and check it looks nicer :-D
- Repeat for: staff auth search, OPAC using ccsr, OPAC using prog
- Signoff

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Work as decribed. No koha-qa errors
Nice view on staff and both opac

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 23:07:03 +00:00
Galen Charlton
ab2a422af6 Bug 10691: (follow-up) replace HTML comments with TT contents
Comments on the usage of Template Toolkit blocks don't need
to appear in the rendered HTML, so this patch converts HTML
comments to TT comments and thereby saves a tiny amount of
bandwidth.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 22:44:25 +00:00
06ef9f1109 Bug 10691: (follow-up) restore behaviour for control field ($w)
As noted by Jared, in the presence of 4XX$w or 5XX$w the display
got broken by this refactoring. This patch restores the previous
behaviour in that front.

The OPAC themes get fixed too, and the Bootstrap one gets this
fix too.

Applied the fix that Galen proposed on comment #30 regarding
Zeno's fix in bug 11174.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 22:39:42 +00:00
ae7431608c Bug 10691: use authority ID in see-also links in authority search results (OPAC)
This patch changes the URL and data used to show the 'see also' links
on the OPAC's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a without linking (i.e. plain text)
- Make sure zebra is running and changes got indexed.
- In the OPAC search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id in the case
  of linked authorities, and to an authority search in the case of
  plain text headings.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 22:38:58 +00:00
c62557a4fa Bug 10691: use authority ID in see-also links in authority search results (staff)
This patch changes the URL and data used to show the 'see also' links
on the Staff's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a entries with plain text (i.e. no
  linking)
- Make sure zebra is running and changes got indexed.
- In the staff interface search for the authority that is linked to the
  others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id for linked
  authorities,
  and to an authority search result in the case of plain text entries.
- Check that the authority search from the cataloguing interface still
  works as usual.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 22:35:58 +00:00
Galen Charlton
4e4a33ef5d Bug 7143: add another name to the about page
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 15:30:43 +00:00
ef7480f362 Bug 7143: Updating about page and history
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 15:28:13 +00:00
Jonathan Druart
c37a8ad151 Bug 11543: (followup) add one more test
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-15 19:58:30 +00:00
Roman Amor
546c6861f9 Bug 11543: Increasing test coverage for Category.pm
To test:
1. Run prove t/Category.t
2. Apply patch
3. Run prove t/db_dependent/Category.t - Notice 2 tests were run

Signed-off-by: daniel <daniel.barker.nz@gmail.com>
Made the requested changes.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-15 19:58:03 +00:00
Francesca Moore
42ec10670e Bug 11522: improve formating of self-registration form
1. in prog theme, enable opac self-registration and inspect clear date
   with firebug; note that there are empty paragraph tags
2. add date of birth as a requirment in self-registration
3. apply patch
4. refresh page and notice that empty paragraph tags have been deleted,
   so that required lines up with clear date
5. repeat the above steps for bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-15 17:25:00 +00:00
Sophie Meynieux
06a8b6f314 Bug 9210: wrap long lines in printed hold notices
This commit adds wrapping styles to print-notices.tt template

Test plan:
  * place a hold on a title with a very very long title or author
  * mark it as "waiting for pickup" by doing a checkin
  * go to command line interface, and run
  * misc/cronjobs/gather_print_notices.pl /tmp
  * misc/cronjobs/printoverdues.sh /tmp
  * if your title/author is long enough, it's split on 2 lines
    with this patch (it is not before this patch)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-15 15:51:44 +00:00
Holger Meißner
41a77e659b Bug 11554: Capitalization fix in patron account on fines tab
Works as described.

To test: Create patron account with outstanding fines. Open "Fines" tab.
Confirm that capitalization is correct.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
String patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-15 15:33:56 +00:00
alex_h
1487949011 bug 11544: increasing test coverage for Installer_PerlModules.pm
To test
1. run prove t/Installer_PerlModules.t
2. apply patch
3. run prove t/Installer_PerlModules.t
   notices more tests are run

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Adds another passing test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:48:43 +00:00
Galen Charlton
19b5ea868b Bug 11541: (follow-up) move Installer.t to t/db_dependent
This test requires a valid Koha context, so this patch
moves it to t/db_dependent.

To test:

[1] Verify that prove -v t/db_dependent/Installer.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:43:56 +00:00
Galen Charlton
89b3b35e62 Bug 11541: (follow-up) update tests
This patch updates some of the tests to more clearly
check that fields in the C4::Installer object are getting
set correctly from the context.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:42:45 +00:00
457ae7e205 Bug 11541: (follow-up) repair some warnings
Tests succeed, but cause many warnings:

prove t/Installer.t
t/Installer.t .. 1/9 "my" variable $self masks earlier declaration in
same scope at t/Installer.t line 19.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 20.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 21.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 22.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 23.
Odd number of elements in anonymous hash at t/Installer.t line 17.
Use of uninitialized value within @ARGV in anonymous hash ({}) at
t/Installer.t line 17.

The patch remedies that.

Test Plan:
1) Apply first patch on this bug
2) Run "prove t/Installer.t"
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) Note the warnings are gone

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:38:11 +00:00
Aleisha Amohia
a75be3ab0d Bug 11541: increase test coverage of Installer.pm
To test
1. Run prove t/Installer.t
2. Apply patch
3. Run prove t/Installer.t
   Notice more tests are run

Signed-off-by: Francesca Moore <francescalamoore@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:37:47 +00:00
0db732980a Bug 11540: (follow-up) add a couple of tests more
This patch makes sure all scenarios are covered for SetUTF8Flag.

Signed-off-by: Emma Heath <emmaheath.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:29:49 +00:00
Emma Heath
6a6df3f5d7 Bug 11540: increase test coverage of Charset.pm
To test
1. run prove t/Charset.t
2. apply patch
3. run prove t/Charset.t
 notice more tests are run

Signed-off-by: Tom Houlker <thomas.houlker@hibs.school.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 21:29:33 +00:00
Tom Houlker
397d95821c Bug 11539: removing 2 unused files
This patch removes C4::Barcodes::PrinterConfig, which is
used by no other code in the database.

Signed-off-by: Emma Heath <emmaheath.student@wegc.school.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No instances of PrinterConfig found in the codebase

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Couldn't find any reference to those files in Koha.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 20:55:28 +00:00
Galen Charlton
53d5a8ba53 Bug 11545: (follow-up) move Languages.t to t/db_dependent
This patch moves t/Languages.t to t/db_dependent/Languages.t,
as the new get for getAllLanguages() works best if there's
a database available.

To test:

[1] Run prove -v t/db_dependent/Languages.t
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 20:48:33 +00:00
merllissia
a52919a222 Bug 11545: Increasing test coverage for Languages.pm
To test
1. Run prove t/Languages.t
2. Apply patch
2. Run prove t/Languages.t again and notice: More tests are run

Signed-off-by: alex_h <dhorsman@xtra.co.nz>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Adds another passing test. I took th liberty of moving the test plan
from the subject to the commit message. :-)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 20:46:59 +00:00
daniel
0f82b21204 bug 11542: Increase test coverage for Print.pm
to test
1. run prove t/Print.t
2. apply patch
3. run prove t/Print.t
Notice more tests are done

Signed-off-by: Roman Amor <romanwilton@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
UT passes, also passes koha-qa.pl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 20:41:31 +00:00
5c67d182ea Bug 11503: [Follow-up] fix another typo
There is still a typo left to fix which I didn't catch because I was
doing a spell-check and didn't double-check the bug report:

Van der Griten -> Van der Grinten

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 20:08:58 +00:00
Galen Charlton
fc0a201bd9 Bug 11537: (follow-up) mock C4::Context::preference
This avoids turning t/Log.t into one that requires a valid
session context.

To test:

[1] Run the following and verify that the test passes.

unset KOHA_CONF
prove -v t/Log.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 19:27:07 +00:00
e96d73aa9f Bug 11502: make library filter in "Holds To Pull" more precise
This patch uses regex checking via the DataTables fnFilter API method
to make the branch filter more precise on the "Holds to Pull" page.

The ability to use regex is built into DataTables so this just adds
the actual expression.

_TEST PLAN_

Before applying:

1) Add library (branches) with codes of NM, NMH, and NB
2) Add items (that can be placed on hold) at all these branches
3) Place a hold on an item that is only available at NM
4) Place a hold on an item that is only available at NMH
5) Place a hold on an item that is only available at NM and NB
6) Go to "Holds to Pull" in the Circulation module
7) Filter by these three different values
8) Note that filtering by "NM" will incorrectly bring up all three
holds, while "NMH" and "NB" will only pull up one (like they should).

Apply the patch.

9) Shift+refresh the page so that your Javascript refreshes
10) Repeat step 7 (filtering by the different branch values)
11) Note that filtering by "NM" will now only bring up the hold for "NM"
and the hold for "NM" and "NB", while the others still only bring up
one hold.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 16:32:47 +00:00
alex_h
5ebca4f340 Bug 11537: Increasing test coverage for C4::Log
To test:
1. run prove t/Log.t
   Notice 1 test is run
2. apply patch
3. run prove t/Log.t
   Notice 3 tests are run

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

I think there might be a typo in "Testing git log status". Should
this read "Testing get log status"? (Noticed while looking at the
code/running perl t/Log.t.)

In any case, thanks for the patch. Looks good!

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

Fixed typo, thanks David

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described:
1..3
ok 1 - use C4::Log;
ok 2 - Testing GetLogStatus
ok 3 - Testing hash is non empty

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 16:30:18 +00:00
Galen Charlton
5c3f36279b Bug 11535: sanitize input from patron self-registration form
This patch adds the use of C4::Scrubber to the processing of input
from the patron self-registration form, thereby closing off one
avenue for Javascript injection.

To test:

[1] Use the OPAC self-registration form to enter a new patron,
    and set its address to something like:

    <span style="color: red;">BAD</span>

[2] In the staff interface, bring up the new patron record.  The
    address will show up in red, indicating a successful HTML
    injection.
[3] Apply the patch and use self-registration to enter a new
    patron with a similar case of unwanted HTML coding.
[4] Bring up the second patron in the staff interface.  This time,
    the undesirable HTML tag should not be present.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tags are not present on testing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug and that the patch fixes it.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-14 16:28:14 +00:00
Ketan Kulkarni
8fbf21da1c Bug 10318: Show primary email in patron search results
This patch makes the patron's primary email address be displayed (as
a mailto link) on the patron search results page.

Signed-off-by: Melissa Lefebvre <melissa@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template only change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 21:33:09 +00:00
e8f5ee9eef Bug 11505: fix untranslatable table headers in Label batch manager
The label batch manager script hard-codes the table header cell labels
in order to pass them to an HTML-building function. This obviously isn't
the best solution for internationalization, but picking the whole scheme
apart would be very complicated.

Instead this patch uses a SWITCH statement to check for each possible
case and outputs the correct translatable string for each.

To test, apply the patch and run "perl translate update" for any
translation. Check the revised po file and confirm that the new strings
are present. View the label batch edit page and confirm that the table
headings look correct: Tools -> Labels -> Manage batches -> Edit batch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests.
Similar fixes are probably needed for other pages of the labels
modules.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 21:03:49 +00:00
f2c6142994 Bug 11381: improve styling of IDreamBooks content in bootstrap theme
Styling of IDreamBooks elements is not correct in the bootstrap theme
because the relevant CSS was not transferred from the prog theme. This
patch adds it back.

To test, switch to the bootstrap theme and enable IDreamBooks system
preferences in the OPAC, particularly IDreamBooksReadometer. Find a book
in the OPAC which shows IDreamBooks review data and confirm that
everything looks correct.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Tested with "The help".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 21:00:25 +00:00
cfc3ce6772 Bug 10896: Add a --verbose option to koha-translate
The -v and --verbose option switches add the --verbose switch to the
misc/translator/translate script call in the packages' 'koha-translate'
command.

The docs are updated accordingly.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:57:04 +00:00
Galen Charlton
5920ca6fa0 Bug 11389: reenable Pg as a DB scheme that Koha can connect to
This patch restores the ability to request a DBI database handle
or a DBIx::Class schema object connected to a PostgreSQL database.

To address the concerns raised in bug 7188, only "mysql" and "Pg"
are recognized as valid DB schemes.  If anything else is passed
to C4::Context::db_scheme2dbi or set as the db_scheme in the Koha
configuration file, the DBD driver to load is assumed to be "mysql".

Note that this patch drops any pretense of Oracle support.

To test:

[1] Apply patch, and verify that the database-dependent tests
    pass when run against a MySQL Koha database.
[2] To test against PostgreSQL, create a Pg database and
    edit koha-conf.xml to set db_scheme to Pg (and adjust
    the other DB connection parameters appropriately).  The
    following tests should pass, at minimum:

    t/Context.t
    t/db_dependent/Koha_Database.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, some additional notes:

- Installed Postgres following
  http://wiki.ubuntuusers.de/PostgreSQL
- Created a database user koha
- Created a database koha
- Changed the koha-conf.xml file
    <db_scheme>Pg</db_scheme>
    <database>koha</database>
    <hostname>localhost</hostname>
    <port>5432</port>
    <user>koha</user>
    <pass>xxxx</pass>
- Installed libdbd-pg-perl
- Ran the web installer until step 3 everything looked ok
  Step 3 complains:
    Password for user koha: psql: fe_sendauth: no password supplied
- Both t/Context.t and t/db_dependent/Koha_Database.t pass

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:56:14 +00:00
Galen Charlton
b7b1db5c81 Bug 11509: (follow-up) fix a couple typos
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:54:37 +00:00
0d28ab4988 Bug 11509: improve usage information printed by koha-create
This patch makes koha-create print better and more descriptive usage
information. Also adds the --help and -h switches.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removed trailing " from:
  $scriptname [db usage mode] [options] instancename"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:52:10 +00:00
83ab4edc5a Bug 11510: koha-translate usage message fixes
The koha-translate's usage message has a couple of inconsistencies:

'--all' should be '--available'
and '--help' is missing from the usage examples.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested using instructions on
http://wiki.koha-community.org/wiki/Testing_man_pages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:50:00 +00:00
a5c762d491 Bug 11503: fix several typos
This patch corrects several typos: Some reported in Bug 11503, others
found during a systematic spell check of the help files.

To test, examine the changes and confirm that the spelling changes are
correct.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 20:47:03 +00:00
Galen Charlton
da853bf74e Bug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie
Now that this cookie no longer exists, remove mention of it
from a test case.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 16:55:37 +00:00
Galen Charlton
914515202d Bug 10952: (follow-up) clear seach history from session after saving it to DB
This patch makes sure that the search history from an
anonymous session is cleared from the session after a user
logs in (and the session history is saved to that user's
record in the database).  This fixes a problem where the
search history from the session got repeatedly added to the
database each time the user did something while logged
into the OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 16:49:01 +00:00
Julian Maurice
939d68ea7b Bug 10952: (follow-up) Always flush session after deletion
This is recommended in CGI::Session documentation.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 16:21:45 +00:00
Julian Maurice
bbf7cd6876 Bug 10952: (follow-up) comments fixes and unit tests
- Remove unit tests for ParseSearchHistoryCookie, which doesn't exist
  anymore
- Add unit tests for ParseSearchHistorySession and
  SetSearchHistorySession
- Remove/Modify comments about search history cookie

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Tests fixed and moved, and comments tidied up

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 16:21:18 +00:00
Julian Maurice
d07df7d512 Bug 10952: Store anonymous search history in session
Storing search history into cookie can cause problems, due to the size
limitation of 4KB.

The solution here is to store search history into the CGI::Session
object, so there is no size limitation (but anonymous search history
still remember up to 15 requests max.)

Test plan:
- Go to OPAC in anonymous mode.
- Check that the "Search history" link is *not* shown in the top right
  corner of the page
- Make some searches on /cgi-bin/koha/opac-search.pl
- The "Search history" link should appear. Click.
- Your search history should be displayed.
- Try to log in with invalid username/password
- Go back to search history, it's still there
- Now log in with valid username/password
- Your anonymous search history should be saved into your own search
  history.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Restoring original sign offs and comments below

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Well, search history saving is similar before and after patch.
i.e. anonmymous search is saved when user logs in, but cookie
KohaOpacRecentSearches is empty.
Shows current an previous session searches

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
All tests and QA script pass, works as described.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 16:20:16 +00:00