koha.git
7 years agoBug 16975 : @INC should not have '.' as its last entry
Chris Cormack [Mon, 25 Jul 2016 20:57:50 +0000 (08:57 +1200)]
Bug 16975 : @INC should not have '.' as its last entry

To Test
1/ Try using a plugin
2/ Apply patch
3/ Test plugin still works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 28eae42d2d09c14d0bb1bd3e1655714b33711ab3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1cf1c89f304fd2d84a1264041e8834444d1c8bf3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16878: Fix XSS in opac-memberentry
Jonathan Druart [Fri, 22 Jul 2016 07:30:54 +0000 (08:30 +0100)]
Bug 16878: Fix XSS in opac-memberentry

The vars are gotten from the url and sent to the template as it. They
must be escaped.

Test plan:
I have not managed to create the original issue, so there is no test
plan for the XSS fix, but you can confirm there is no regression.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9bdea2e3691fd62e777cc974f89b867a69eec9a8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b505c6b7d636f262eadef82984b83b5194438724)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16988 - Suspending a hold with AutoResumeSuspendedHolds disabled results in error
Kyle M Hall [Wed, 27 Jul 2016 18:00:53 +0000 (18:00 +0000)]
Bug 16988 - Suspending a hold with AutoResumeSuspendedHolds disabled results in error

iUnless AutoResumeSuspendedHolds is enabled, attempting to suspend a
hold from reserve/request.pl results in the following error:

The given date (undefined) does not match the date format (us) at
/home/vagrant/kohaclone/Koha/DateUtils.pm line 152.

Test Plan:
1) Enable SuspendHoldsIntranet
2) Disable AutoResumeSuspendedHolds
3) Attempt to suspend or unsuspend a hold
4) Note the error
5) Apply this patch
6) Repeat step 3
7) The hold should suspend or resume correctly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Megan Wianecki <mwianecki@mtpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 91bc9451d0378d65100c828776b09395e4c88199)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3810c29f61ebcd815066f1be2abc08cbb2bdc0aa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17022: Fix XSS in circ/branchtransfers.pl
Jonathan Druart [Tue, 2 Aug 2016 13:00:02 +0000 (14:00 +0100)]
Bug 17022: Fix XSS in circ/branchtransfers.pl

Test plan:
Enter the following in the barcode input:
    <script>alert('XSS')</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c63d0b311b5e7ba882d19b9b8a71838256de98cf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 46322ffc6e683d0583283e7485548d46c9586019)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17024: Fix XSS in tools/viewlog.pl
Jonathan Druart [Tue, 2 Aug 2016 13:32:46 +0000 (14:32 +0100)]
Bug 17024: Fix XSS in tools/viewlog.pl

Test plan:
    Hit /tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=<script>alert("XSS")</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f563ba795e4863328ff4930e7877caae9458206c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 24664b719f9d09210f30d7f96fc025e08da8124e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17026: Fix XSS in serials/checkexpiration.pl
Jonathan Druart [Tue, 2 Aug 2016 13:51:49 +0000 (14:51 +0100)]
Bug 17026: Fix XSS in serials/checkexpiration.pl

Test plan:
Hit:
 /serials/checkexpiration.pl?title="><script>alert("XSS")</script>&date=12/02/2002
 /serials/checkexpiration.pl?issn="><script>alert("XSS")</script>&date=12/02/2002

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9d00353a92487dcde654d88206fd5458448fff1b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ec78a0d43fe8032d9eeb9272878129085c3c429f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 17028: Fix XSS in reserve/request.pl
Jonathan Druart [Tue, 2 Aug 2016 14:41:49 +0000 (15:41 +0100)]
Bug 17028: Fix XSS in reserve/request.pl

Test plan:
Hit
  /cgi-bin/koha/reserve/request.pl?biblionumber=1"><script type="text/javascript">alert("XSS")</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 66f81fc2101f194d39592bc28f3e2ff69764bc00)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 542c0dbbaa8bff5a101058e0e2397e21edf8f192)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15397 - Pay selected does not works as expected
Kyle M Hall [Thu, 19 May 2016 13:28:02 +0000 (13:28 +0000)]
Bug 15397 - Pay selected does not works as expected

When patron has more fees (account lines) and you wan't to pay just some
of them, you select wanted lines a click on "pay selected" button. But
the fine isn't paid, the "amountoutstandig" is not modified, but it is
added new line with "pay" code an with amountoutstanding below zero.
Paying one or all fine works as expected. Paying selected worked some
time ago, but I don't know when it stopped working, we realize it after
upgrade to 3.22.

Test Plan:
1) Apply this patch
2) Pay fines using "Pay selected"
3) Note the payment and the fees outstanding balances are reduced!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 537adde2d2f65ed9bb9a03a127b9906930d46353)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c0e2610bda62b3890fd5416124bc9c1157c23d4d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16573: Update DB rev (3.22.09.002)
Frédéric Demians [Mon, 1 Aug 2016 09:54:30 +0000 (09:54 +0000)]
Bug 16573: Update DB rev (3.22.09.002)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16573: Define virtualshelves.created_on as datetime for existing installs
Jonathan Druart [Fri, 22 Jul 2016 08:51:00 +0000 (09:51 +0100)]
Bug 16573: Define virtualshelves.created_on as datetime for existing installs

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44785935bd45291a2ae36a5c9ab65b1e6cf69c5b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d2b20b2a82ef73423ec6571967173083ba333501)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16573: change created_on type - atomic update
Bernardo Gonzalez Kriegel [Tue, 24 May 2016 21:12:11 +0000 (18:12 -0300)]
Bug 16573: change created_on type - atomic update

This patch change 'created_on' virtualshelves column to
datetime type

To test:
1) Apply the patch
2) Run updatedatabase.pl
3) Verify type of 'created_on' column

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 162b9015d9bfb23200d1bddff69be9384a33463b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ce68d9b7fd14f9959f18039b63ad3e7bea44213e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16573: fix structure and sample data for MySQL 5.7
Bernardo Gonzalez Kriegel [Mon, 23 May 2016 20:06:01 +0000 (17:06 -0300)]
Bug 16573: fix structure and sample data for MySQL 5.7

Web install on Ubuntu 16.04/Mysql 5.7 fails.

This patch makes small changes to make installation
possible to kohastructure.sql and some sample files.

Sample values for quotes table can't have '0000-00-00 ...' values
nor NULL values, now() is perhaps an option.

Depends on Bug 16572

To test:
1) System with MySQL 5.7, for example Ubuntu 16.05
2) Apply 16572
3) Try web install, it fails
4) Apply this and next patch
5) Try again, now it succeed

This is only for English install, i18n files needs revision
I can do that if this is accepted.

Perphaps a change is needed to updatedatabase.pl

Ammended patch, 'created_on' field on virtualshelves
can't be timestamp default null, mysql 5.5 complains
that only one timestamp column can be defined as
default not null. Changed to 'datetime' type.

Can provide followup with updatedabase change,
but need an opinion if this type change makes sense.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 36b2b288a7b8a39530f0a1ba7a00396206640533)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8955b1b7c56ebbcf350a57e3a794597e0ac2d70c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16573: fix linkid value on marc_subfield_structure
Bernardo Gonzalez Kriegel [Mon, 23 May 2016 19:58:03 +0000 (16:58 -0300)]
Bug 16573: fix linkid value on marc_subfield_structure

followup to previous patch.

This patch fixes linkid value. It was set to '', but
declared as tinyint.
Mysql < 5.7 replaced this with nearest right value, i.e 0
Mysql 5.7 gives error here.

Also some normalization, all lines with data begins with two tabs

To test:
On top of Bug 16572 and previous patch

1) Run webinstaller
2) Add mandatory values
3) There must be no problems on MySQL 5.7

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d00d46112df2dc1c3f823fbc2a8c347deb69cdb7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 58bd47a462a008f2e5cb9cfa221ee5b0a0bd5826)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16934: Add test for ModOrder
Jonathan Druart [Thu, 21 Jul 2016 17:23:00 +0000 (18:23 +0100)]
Bug 16934: Add test for ModOrder

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7adb8861aa352afdfd300bc50d03af450e26468f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 043c8f105b12a0bc52c14048b387c3b4b4b16d96)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16934 - Cannot add notes to canceled and deleted order line
Kyle M Hall [Mon, 18 Jul 2016 11:02:14 +0000 (11:02 +0000)]
Bug 16934 - Cannot add notes to canceled and deleted order line

Some librarians would like to be able to add notes to deleted order
lines to keep track of data such as what title the order line was for.
For some reason ModOrder dies if a biblionumber is passed in, even
though it does not use biblionumber and does not need it to exist in any
fashion! This limitation should be removed.

Test Plan:
1) Create a basket with an orderline
2) Cancel the order / delete the record
3) Click the "Add internal note" link for that order line
4) Fill in a note and click "Save"
5) Note the error
6) Apply this patch
7) Repeat steps 3-4
8) Note this time the note is saved!

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7cc6f6eb45333e1f2041e53dcfdc31532880bd9f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 43f7f6b0bddc3423220c7522569bce4f6f6d94fc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16958: Fix XSS in opac-imageviewer.pl
Jonathan Druart [Fri, 22 Jul 2016 07:14:27 +0000 (08:14 +0100)]
Bug 16958: Fix XSS in opac-imageviewer.pl

Test plan:
Trigger
/opac-imageviewer.pl?biblionumber=14&imagenumber=7"><sCrIpT>alert(42)<%2fsCrIpT>

=> Without this patch you will see the JS alert
=> With this patch applied you won't see it

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 65918b146cd88f38a9d894be8175d049ea70d05f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a3e2ea765f2e34f397fa9e1236dbc4e837311f88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16716: Replaced wrong GROUP BY with DISTINCT
Srdjan [Mon, 13 Jun 2016 03:35:56 +0000 (15:35 +1200)]
Bug 16716: Replaced wrong GROUP BY with DISTINCT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 52ac9a1ca3990102c3c635e3d9af06aae29f73e1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 16b97e21d0ed13e5f38987c64db55ae15d944dc3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15974: Rancor: Correctly select existing authorized value
Jesse Weaver [Wed, 20 Jul 2016 22:51:45 +0000 (16:51 -0600)]
Bug 15974: Rancor: Correctly select existing authorized value

Test plan:
  1) Open up a record in Rancor with an itemtype besides the first in
     the list ('BK' in the sample itemtypes).
  2) It will show "Book" instead of the correct itemtype.
  3) Apply patch, reload the page.
  4) The correct itemtype should now show.

NOTE: The scope is only 942$c. This corrects that.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b01aa596abb91f8679c64e89197fbb2b3d9309cc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 90dbfef3295130d62adf61b0e9d1dab44a4e0d4f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16531: Circ overdue report is showing an empty table if no overdues
Aleisha [Tue, 17 May 2016 04:46:31 +0000 (04:46 +0000)]
Bug 16531: Circ overdue report is showing an empty table if no overdues

EDIT: Comment 2
EDIT2: using noreport variable (Comment 5)

To test:
1) Ensure you have no items overdue
2) Go to Circ -> Circulation reports -> Overdues
3) Notice empty table, '0 items overdue' heading
4) Ensure syspref FilterBeforeOverdueReport is set to 'Don't require'
5) Apply patch and refresh page
6) Notice empty table is no longer showing and page says "There are no
   overdues"
7) Apply a filter to search
8) Page now says "There are no overdues matching your search" with a
   link to reset filter.
9) Click Reset filter -> confirm any filters you applied are cleared.
10) Set FilterBeforeOverdueReport to 'Require' and refresh overdue
    report
11) Page should say "Please choose one or more filters to proceed"
12) Check out an item to a member, ensure due date is a date that has
    passed (i.e. yesterday)
13) Refresh overdue report page
14) Page should still say "Please choose one or more filters to proceed"
15) Set FilterBeforeOverdueReport to 'Don't require'
16) Confirm table now shows correctly with '1 items overdue' heading
    etc.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b7c61a5d128cc3580ea3ee67bc29e02571923dd3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit de5621dd9b1f2e03ec5d4f37226fa462b2bf6b28)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16888: (follow-up)Add Font Awesome Icons to Members
Hector Castro [Mon, 11 Jul 2016 14:34:38 +0000 (08:34 -0600)]
Bug 16888: (follow-up)Add Font Awesome Icons to Members

Remove fa-ban according with QA comment 4

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dba6cfe441a3ee14183287795c0c4293c74b2989)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 160c584100877b3c25d2294180f59013fc7a5043)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16888: Add Font Awesome Icons to Members
Hector Castro [Fri, 8 Jul 2016 21:52:06 +0000 (15:52 -0600)]
Bug 16888: Add Font Awesome Icons to Members

Add Font Awesome Icons to:
- "Select/Clear all" links to pay.tt (Pay fines tab)
- "Filter icon" in "filter paid transactions" to Accout tab (boraccount.tt)
- "Trash icon" to Remove option in "Manual restrictions"
(borrower_debarments.inc) also add "Ban and plus icon" to "Add manual restriction"

To test:
-Apply patch
-Select a patron who has fines
-Go to "Fines->Pay fines" tabs and see the icons in "Select/Clear all"
-Choose the "Account" tab and sse the icon in "Filter paid transactions"
-Select the "Check out" tab and go to "Restrictions"
-Add a manual restriction and notice about the two new icons fa-plus and fa-band
-See the new button btn-mini and the fa-trash icon
-Verify that all works as expected

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ae4195207726fb01cebad0d809addaefffe37975)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 24e2de8973a770c5d125de29654976b32bb66ea1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16777: Correct intranet search alias
Marcel de Rooy [Mon, 20 Jun 2016 12:57:25 +0000 (14:57 +0200)]
Bug 16777: Correct intranet search alias

A long-standing typo in our apache config files:
[intranet]/search refers to search.pl (which does not exist)

This patch refers it to catalogue/search.pl

Test plan:
Run an install or copy the change from apache-shared-intranet.conf or
koha-httpd.conf to your apache config. Restart Apache and check
if http://[your staff client]/search works.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by making manual changes according to the patch. Did not test a
new installation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3fe6abc9d57fc1dc9968af0b25644f4cdb2289e0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 113aaae895c10faeddebd5bd41fd06c1ca8002c0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16701: Translatability: Fix problem with isolated ' in currency.tt
Marc Véron [Tue, 21 Jun 2016 07:08:06 +0000 (09:08 +0200)]
Bug 16701: Translatability: Fix problem with isolated ' in currency.tt

This patch moves markup <span class="ex"> into template variables to
avoid sentence splitting.

To test:
- Apply patch
- Verify that currency administration works as before
  (Home > Administration > Currencies & Exchange rates > Currencies)
- Examine code changes

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a83d75b6f2d59c3c2ac8d1b549b364fa79f52efe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 538535ba7deb871d252b1afaf2ee4cb515350b98)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16621: Translatability: Issues in opac-user.tt (sentence splitting)
Marc Véron [Fri, 10 Jun 2016 08:25:54 +0000 (10:25 +0200)]
Bug 16621: Translatability: Issues in opac-user.tt (sentence splitting)

This patch fixes issues due to sentence splitting in
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt

Note: This is a string patch. It does not add or change functionallity.

To test:
- Examine code and verify that the text changes remove sentence splitting
  and that the changes make sense.
- Log in to OPAC and verify that messages look correct
  - with blocked /debarred user (with and without comment and date)
  - with user who has to much fines (needs syspref OpacRenewalAllowed
    and syspref OPACFineNoRenewals)
  - with user who has his card marked as lost
  - with user with an account that is about to expire
  - with user with expired account
  - with user with uncertain address information (with and without
    syspref OPACPatronDetails set to Allow)

Note: Amended to make patch apply 2016-07-10 mv
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dc1ff4efff70cabfad5b8e2e69e7a9448cc61e16)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1c9e281e3981f965d61070644d14456a3a5f630c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16897 - Re-focus on "Add item" in Lists
Fridolin Somers [Mon, 11 Jul 2016 14:31:18 +0000 (16:31 +0200)]
Bug 16897 - Re-focus on "Add item" in Lists

Bug 11325 add solved a focus on "Add item" missing in Lists page.
Since revamping of this page, the add item form exists both in page.
The one corrected by Bug 11325 is not visible because it checks a bad
var allowaddingitem instead of can_add_biblios.

This patch removes the first form and corrects the second form.
It moves the form at left part of page so that it is always shown
(usefull when there are a lot of items). It does not add the list name
after "Add item" besause it whould be huggly for long names and because
listname already exists in breadscrumbs and on top of the table.
It also adds autocomplete="off" on barcode input because there can be
problems with a scanning device.

Test instructions:
1. Create a list
2. Make sure you have an object with an assigned barcode
3. Go to the list
   => The barcode entry interface should be at left and has the focus
4. Enter the barcode and press enter (or use a scanner)
   => The item is added to the list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This is a nice improvement, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fcf2e1325e6cf056b5b7e5e95545adcd322d1b52)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 723711ba9d512349dcbfabab609d0dc9a7a79dfd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16893 - Missing closing tag disrupts patron checkouts page style
Katrin Fischer [Mon, 11 Jul 2016 20:56:11 +0000 (22:56 +0200)]
Bug 16893 - Missing closing tag disrupts patron checkouts page style

Same fix as for the details page: checkouts page is very italic
when there is a restriction with a comment on the patron
account.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93aff1fe37f7a9142958f11b45cfbcb62d646f62)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1151773c56ca620f231e484ec62066088aeb9d71)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16893: Missing closing tag disrupts patron detail page style
Owen Leonard [Mon, 11 Jul 2016 12:51:12 +0000 (08:51 -0400)]
Bug 16893: Missing closing tag disrupts patron detail page style

A missing closing </i> causes the the patron detail page to be in all
italics if the patron has a restriction message. This patch corrects it.

To test, apply the patch and locate a patron who has a restriction
message. The restriction message should be in italics but the rest of
the page should display normally.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Rest of the page displayed normally

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 27a7cdef1a6187fe7814a75e4fc5cee636ed77fa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6ba7acf4e0b199a5d043b1e8b762741a41860d63)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16813: Allow empty string for OPACBaseURL
Jonathan Druart [Mon, 27 Jun 2016 12:32:31 +0000 (13:32 +0100)]
Bug 16813: Allow empty string for OPACBaseURL

The pref is prefixed by 'http://', but it should not when the pref is
set to an empty string.
This will fix the bug raised on bug 14790 comment 14.

Test plan:
Empty OPACBaseURL and confirm that it's save as it in DB

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
OPACBaseURL is saved up empty. Prefix http:// is not saved anymore

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e9b6a5e31e1bc225a6e620dcefbd9545bb6d98bf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4fa7e90b0e650cd5e9e33a708b89052238197f30)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14138: Patroncard: Warn user if PDF creation fails
Marc Véron [Tue, 5 Jul 2016 17:23:59 +0000 (19:23 +0200)]
Bug 14138: Patroncard: Warn user if PDF creation fails

Change patroncards/create-pdf.pl to redirect with an error message
instead of writing an invalid pdf that does not open in pdf viewer.

To test:
- Apply patch

- Test that pdf creator behaves as before (with valid batches and
  patron lists)

- While testing, copy pdf link address from window with title 'Click
  the following link(s) to download...'

- Open another staff client browser tab

- Paste link to browser address field, change batch id rsp. patron
  list id to an invalid value and submit

- The window should redirect to cgi-bin/koha/patroncards/create-pdf.pl
  and display an error message

- Bonus test 1: Create an empty patron list and test patron card
  creation. You should get an error message as appropriate.

- Bonus test 2: Use a link with params like the following:
  ...create-pdf.pl?borrower_number=61&template_id=2&layout_id=1&start_card=1
  Verify that you can create a pdf with a valid borrower_number and that
  you get the error message with an invalid borrower number

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b51f2baa7c1035657594f90d17c7c9eeedf4ea84)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5de1b336da5d0acdd589cacbf11abc9f8b35692e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16682: (followup) Fix display if Batch patron modification tool does not get...
Marc Véron [Tue, 5 Jul 2016 22:27:30 +0000 (00:27 +0200)]
Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons

Format message as proposed in comment #8

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5a1f3acaabf235733a3e7a98d16d0395df1980b8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c27ba3c7bd41f51a9da871db47b93fa6c4ad60a0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16682: Fix display if Batch patron modification tool does not get any patrons
Marc Véron [Tue, 5 Jul 2016 00:10:55 +0000 (02:10 +0200)]
Bug 16682: Fix display if Batch patron modification tool does not get any patrons

To reproduce:
- Go to Tools->Batch patron modification
- Submit without filling any of  "Use a file", "Or use a patron list",
  "Or list card numbers..." or use a patron lists with zero members
Result: Screen without any information

To test:
- Apply patch
- Repeat steps above
- Verify that you get a nice message
- Verify that the tool works as before
  - with invalid card numbers only
  - with valid and invalid card numbers
  - with valid card numbers only

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c0d420f42a293e68228bbe7fa95545a08fd2c964)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 36ffbb193fb8b2374a60b9acee8ca55ff5a7ea81)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006: Update DB rev (3.22.09.001)
Frédéric Demians [Mon, 1 Aug 2016 11:29:32 +0000 (13:29 +0200)]
Bug 15006: Update DB rev (3.22.09.001)

7 years agoBug 15006: [QA Follow-up] Only handle login requests in raw_transport
Marcel de Rooy [Wed, 13 Jul 2016 09:59:28 +0000 (11:59 +0200)]
Bug 15006: [QA Follow-up] Only handle login requests in raw_transport

Although mainly hypothetical, it would still be possible to get
response from the server for an acs resend request. (This exception
is allowed in MsgType::handle.)
I also noticed that the response may well be a message from an older
session still.
This patch just removes that exception by only passing login requests
to sub handle in the raw_transport loop.

Test plan:
[1] Verify normal login procedure for raw.
[2] Check a few acs resend requests in raw. They should terminate without
    a response.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e465d1aa4b16d7392950b2b682f99eb0c58c1ffd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a0a0e057c0620a49246d0b5c55a6013b1f664780)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006: [QA Follow-up] Satisfy qa tools with one tab less
Marcel de Rooy [Tue, 12 Jul 2016 13:48:34 +0000 (15:48 +0200)]
Bug 15006: [QA Follow-up] Satisfy qa tools with one tab less

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 64fe6e350074db48cf337dcf1794b40a58d7e606)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit aee5ba06949551ec789e5d95a41f8f224b2ae295)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006 Correct indentation of EXPORTs in Sip.pm
Colin Campbell [Wed, 6 Jul 2016 14:25:21 +0000 (15:25 +0100)]
Bug 15006 Correct indentation of EXPORTs in Sip.pm

Removed tabs and used spaces consistently
Used 'use base' to remove unnecessary BEGIN sub and
explicit setting of ISA at application level

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4ad4ab6396af26bed9dceb442adf4aad6687f362)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ad235daaa74193947a328f96ed35d43aa0ec6663)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006: Centralize timeout logic and allow zero client timeout
Marcel de Rooy [Wed, 6 Jul 2016 14:14:45 +0000 (15:14 +0100)]
Bug 15006: Centralize timeout logic and allow zero client timeout

Moving timeout logic to one routine (with unit test).

This further implements two suggestions from Kyle and Larry:

[1] You could use a client_timeout of 0 to specify no timeout at all.
[2] Have the client_timeout default to the timeout if not defined.

Test plan:
[1] Run t/db_dependent/SIP/SIPServer.t.
[2] Test login timeout for raw and telnet.
[3] Check ACS status message for timeout value. Should match policy
    timeout from institution.
[4] Test client timeout (zero and non-zero).
[5] Remove client timeout. Test fallback to service.
[6] Remove service timeout too. Test fallback to 30 at login.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to incorporate Srdjan's suggestion to move get_timeout to
SIPServer.pm; this requires some additional mocking in the unit test.
And even makes the test db dependent, as documented.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eb8666357ce72e910569843f8acce674a332f4b0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e8a03065affb09718d16781a8beecfa262497639)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006: Introduce client_timeout in SIPconfig.xml
Colin Campbell [Fri, 20 Nov 2015 12:12:48 +0000 (12:12 +0000)]
Bug 15006: Introduce client_timeout in SIPconfig.xml

Most selfchecks have persistent connections and send a
periodic status request at intervals (approx every 5mins appears
the norm) The timeout was dropping connections by default every 30secs
which for the client appears as a very flakey network.

This patch adds a separate parameter client_timeout that can be
used if you do want to force a disconnect if the client sends
no requests for a period. The sample config sets it to 600, but you
can also define a 0 value meaning no timeout. If the parameter is not
defined, it will fallback to service timeout.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Restored this patch from Colin in order to separate it from the
get_timeout patch. Adjusted the commit message slightly.
The original value of 600 from Colin's earlier patch may give less
discussion than setting to 0 (no timeout) in a later proposal.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b27da7e0ce25c806612743100609255ace48257c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d477ba8b0621fae9c847ef4e84d685ef396b3258)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006 Remove tabs from sip_protocol_loop
Colin Campbell [Tue, 5 Jul 2016 09:36:31 +0000 (10:36 +0100)]
Bug 15006 Remove tabs from sip_protocol_loop

Remove the tabs causing inconsistent indentation
of sip_protocol_loop and replace with spaces

Reimplements the renaining parts of Marcel de Rooy's
original QA patch

No logic changes in this patch - layout only

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2b725b6728ea4156562aa6225b2323861f616885)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f5995e7ae9d66ce492d8314d087bf0d4f39c668a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15006 Drop raw connection if login fails
Colin Campbell [Mon, 4 Jul 2016 15:13:16 +0000 (16:13 +0100)]
Bug 15006 Drop raw connection if login fails

raw_connection was not behaving correctly if an invalid string was
passed or a login failed.
It was not checking that the login succeeded ( it checked that account
existed not that it contained data and it existed even if login failed)
and so failed logins instead of aborting immediately fell through into
the sip_protocol_loop, forcing that to timeout invalid connections.
It now checks that account has id set and returns if not.

The timeout alarm is now set on the while loop, in normal running this
should not be triggered as the socket is opened and the first data
should be a login message and the while loop should only iterate once,
but lets not go into an infinite loop due to unforeseen circumstances.

I have reindented the routine as the flow was not clear (the while was
not indented at all.

Also if using Net::Server::PreFork when a new connection comes in you
may be handed the the successful login parameters from a preceding call.
Because of this you could successfully transmit transactions and Koha
would carry them out without having received a valid login ( and
possibly with the wrong account details!) We now delete any existing
account for new connections.

NB: This patch requires that the patch for bug 13807 has been applied

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4f0fd3db556652f961710c64b9806512a491a7d3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4c91e8777004392459371bb20db8599c8c5a2646)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 12178: Fix tests not to depend on dateformat syspref
Jonathan Druart [Tue, 21 Jun 2016 11:31:40 +0000 (12:31 +0100)]
Bug 12178: Fix tests not to depend on dateformat syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e75d9befca13c2f74706e5eb7874a27bdc1928f1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 008f50fccb75945f7141660c36855b7b14550f33)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 12178: Tests for changes to claimed serial status
Florent Mara [Tue, 24 May 2016 02:10:32 +0000 (14:10 +1200)]
Bug 12178: Tests for changes to claimed serial status

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Remove trailing spaces

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c765d105096ac8c0bc5afd51eb212db54c7901e0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a14999b7bdb745ccd18ea2ba719defa12fae8abd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 12178: Update serial status to "claimed" when exporting to CSV
Jonathan Druart [Tue, 28 Apr 2015 15:00:44 +0000 (17:00 +0200)]
Bug 12178: Update serial status to "claimed" when exporting to CSV

On the same way as late issues, the serial status should be updated to
'claimed' when the issues as exported as csv.

QA note: The updateClaim and UpdateClaimdateIssues subroutine did almost the
same thing, I kick the second on off to centralize the code.

Test plan:
1/ Export some late issues as CSV (serials/claims.pl).
2/ Refresh the page (the export does not do it) and confirm that the
status, the claim date and the claim count have been updated.
3/ Select some others issues, select a notice and send the notification.
Confirm that the behavior is the same.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b416ac16b5c67d902444041882c31a99e0525fa0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d4b8efca308423c9abfc3a55b22df51f46396435)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 2735: Update opac.css
Jonathan Druart [Thu, 9 Jun 2016 15:42:27 +0000 (16:42 +0100)]
Bug 2735: Update opac.css

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 2735: Fix authority search pagination at the OPAC
Jonathan Druart [Thu, 9 Jun 2016 15:39:56 +0000 (16:39 +0100)]
Bug 2735: Fix authority search pagination at the OPAC

The authority search pagination displays only 15 pages, even when there
are more.
To fix that, this patch mimic the authorities-home.pl intranet script to
manage the pagination.

Test plan:
Without this patch, do some authority search and click on different
pages.
Apply this patch, redo the same search and make sure the same records
are displayed (i.e. confirm that the pagination still works as before).

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit de2df0dfe85bc8ac33375ad5b436ac247c3875d6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 08efc656cfdf6f572890f27ff822b188dfadf178)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 13807 Rework main input loop in SIPServer
Colin Campbell [Fri, 6 Mar 2015 11:57:09 +0000 (11:57 +0000)]
Bug 13807 Rework main input loop in SIPServer

Debugging various problems in SIPServer and control of it, found it
could loop on unread buffers (e.g. the LF of a CRLF if it was only
expecting CR) making it unresponsive to signals.
Reworked the input loop with an eye to removing unnecessary whiles
and replacing the while(1) by a while( connection valid)
Enhanced the timeout code by wapping in an eval.
Moved the logic from SIP_read_packet into the server itself
Hopefully this makes the already baroque code easier to navigate
and it did seem the server was the logical place for this
Removed no longer iused SIP_read_packet from Sip.pm

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 94441be435d9be074fc0f93bbec2c2e9122a5d67)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0817cf906f39d5b564f917ac4a2f0372fa332c43)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16866: Catch warning t/db_dependent/Languages.t
Mark Tompsett [Wed, 6 Jul 2016 19:19:46 +0000 (15:19 -0400)]
Bug 16866: Catch warning t/db_dependent/Languages.t

TEST PLAN
---------
1) prove t/db_dependent/Languages.t
   -- noisy output
2) apply patch
3) prove t/db_dependent/Languages.t
   -- no noise
4) run koha qa test tools.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No noisy output

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 042e8cf24bf3de4192b4c7cf0ca4e5f1da6c3ce9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f9b989e3dd0e6e1a6d92c34a3c325ec14b749231)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16805: Log in with database admin user breaks OPAC
Mark Tompsett [Thu, 23 Jun 2016 18:51:26 +0000 (14:51 -0400)]
Bug 16805: Log in with database admin user breaks OPAC

TEST PLAN
---------
1) Apply Jonathan's test patch
2) prove t/db_dependent/Letters.t
   -- dies before finishing tests
3) Apply second test patch
4) prove t/db_dependent/Letters.t
   -- dies before finishing tests
   -- 'addalert' is changed to 'getalert'
5) Log into OPAC with database admin user.
   -- see error given in comment #0
6) Apply this patch
7) prove t/db_dependent/Letters.t
   -- says 'getalert'
   -- all tests pass.
8) Log into OPAC with database admin user.
   -- logs in, but gives warning with a nice logout button.
9) run koha qa test tools.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No kaha qa errors
In debian display diferent error:
Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054.
Works as advertised

NOTE: Revised test plan, as Jonathan added useful test case.
      Works as I've tested above.
      Hector tested older test plan which was steps
      5,6,8 and 9.

      Revised test plan again while tweaking to address comment #9.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dee29d9f0b2b43bc762cb82a2212cd8a3d243f45)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e45ed6d2f477aa9a85750c0f7c2a4df1af50e94f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16805: Tweak new test message to say getalert
Mark Tompsett [Fri, 24 Jun 2016 16:28:27 +0000 (12:28 -0400)]
Bug 16805: Tweak new test message to say getalert

It said 'addalert', which is likely a cut-paste typo.
Plus, let's keep running the other tests if that one
goes bad.

TEST PLAN
---------
1) Apply Jonathan's test patch
2) prove t/db_dependent/Letters.t
   -- dies before finishing tests
3) Apply this test patch
4) prove t/db_dependent/Letters.t
   -- still dies before finished tests,
      'addalert' now is 'getalert' in message.
5) run koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c57655d4ad69f82831b7f1b54b31a69d0d8275ee)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 946764c470a767439d65b463a4db9b2fdb0b58c4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16805: Add test to getalert (no param passed)
Jonathan Druart [Fri, 24 Jun 2016 16:02:59 +0000 (17:02 +0100)]
Bug 16805: Add test to getalert (no param passed)

TEST PLAN
---------
1) apply patch
2) prove t/db_dependent/Letters.t
   -- fails
3) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5821ff3867c5291558238e54686c6834caa266c6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a7dd3dcc3f565f18876f233cf8ade85cbc5b2d25)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16801 - Include Font Awesome Icons to check/unchek all in Administration > Librar...
Hector Castro [Wed, 22 Jun 2016 17:11:03 +0000 (11:11 -0600)]
Bug 16801 - Include Font Awesome Icons to check/unchek all in Administration > Library transfer limits

For purpose to uniformity and leave just one entry in .po files,
this patch change: Check all/Uncheck all -> to -> Select all/Clear all.
Also added Font Awesome icons.

To test:
-Go to Administration > Library transfer limits
-Notice about Check all/Uncheck all for "For all items types" and
 "Policy for:"
-Apply patch and refresh the screen
-Notice about the new Select all/Clear all links with their icons
-Confirm that all links work as expected

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c9bb9dc14064ddecf767145b7a2bb26794ca090e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e766a5eae9c6919bac7fe42d379c827a1a18e7f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16730 - Use member-display-address-style*-includes in moremember-brief.tt
Marc Véron [Tue, 14 Jun 2016 06:41:03 +0000 (08:41 +0200)]
Bug 16730 - Use member-display-address-style*-includes in moremember-brief.tt

To test:
- Apply patch
- Create a new patron with the same first and last name as an existing
  patron. This should trigger a duplicate warning message. Click the
  "View existing record" link to trigger a pop-up window with a patron
  detail brief view.
- Verify that the address information displays the same way as on the
  patron details screen (moremember.pl).
- Change syspref 'AddressFormat' and verify that the address displays
  as appropriate.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Works as described: AddressFormat is taken into account on 'view exiting
  record' dialog box.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f542ce5a82a40b503b10c709b8b960ace2637f7d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a7e0bc97113b7ac8f08c417ccd4060f2067cf5fe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16677 - Use abbr for authorities linked headings
Fridolin Somers [Tue, 7 Jun 2016 07:27:15 +0000 (09:27 +0200)]
Bug 16677 - Use abbr for authorities linked headings

In authorities search results, UNIMARC flavour, linked headings are displayed
with a link type : BT, NT, UF, RT.

This patch adds a abbr tag around those acronyms to know there meaning :
BT = Broader Term
NT = Narrower Term
UF = Used For
RT = Related Term

Acronyms are used because there can be a lot of linked headings, using abbr
will display the complete text on mouse over.

Test plan :

- Use UNIMARC database
- Create an authority with :
250 $a Heading250a
450 $a Heading450a
550 $5 a $a Heading550a
550 $5 g $a Heading550g
550 $5 h $a Heading550h
- Save an index zebraqueue
- Go to intranet authorities search
- Search for "Heading250a"
- You see :
Heading250a
Heading250a
UF: Heading450a
RT: Heading550a ; BT: Heading550g ; NT: Heading550h
- Move your mouse over the acronyms, you see a tip with the complete text
- Same with opac authorities search

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Works as described. Translatable.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b9e47f135e036232b00cd3b24bb25ea0c6a9291e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3471304666e1b1a9379ef5a423291af6909b6fe5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16860: Remove the comment about the warning
Jonathan Druart [Thu, 7 Jul 2016 15:52:10 +0000 (16:52 +0100)]
Bug 16860: Remove the comment about the warning

It is no longer necessary.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c19f342bb1a8eaae25db979e94dc23efa4bc8a26)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ee7af309a628b5ac4655ca7c53a9fa3ab50647d6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16860: Catch warning t/db_dependent/ClassSource.t
Mark Tompsett [Wed, 6 Jul 2016 15:51:40 +0000 (11:51 -0400)]
Bug 16860: Catch warning t/db_dependent/ClassSource.t

$ prove t/db_dependent/ClassSource.t
t/db_dependent/ClassSource.t .. 3/24 attempting to use non-existent class sorting routine routine1
t/db_dependent/ClassSource.t .. ok
All tests successful.
Files=1, Tests=24,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.66 cusr  0.02 csys =  0.70 CPU)
Result: PASS

The above warning might be scary to those unfamiliar with the test.
Add a test to catch the warning.

TEST PLAN
---------
1) prove t/db_dependent/ClassSource.t
   -- as above
2) apply patch
3) prove t/db_dependent/ClassSource.t
   -- no message
4) prove -v t/db_dependent/ClassSource.t
   -- test 13 is the new test
5) run koha qa test tools

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Workas as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b80318f1b7441328d818dfe67a4cb8cd345f585e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 756f75a0445b2e700d34b84dadde478fa7ddee83)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16857: Check on item.branches makes more sense
Jonathan Druart [Thu, 7 Jul 2016 15:40:47 +0000 (16:40 +0100)]
Bug 16857: Check on item.branches makes more sense

The test should be on the existence of the item.branches
method/attribute

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f38bcf5505e1196c3ae4d2e9d5df523bb07ef281)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6a7fd3ecdc60b00252fa65cede5cde655312ec98)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16857 - patron-attr-types.tt: Get rid of warnings "Argument "" isn't numeric"
Marc Véron [Mon, 4 Jul 2016 09:37:33 +0000 (11:37 +0200)]
Bug 16857 - patron-attr-types.tt: Get rid of warnings "Argument "" isn't numeric"

To vrify:
- Go to Home > Administration > Patron attribute types
- Make sure you have some patron attribute types with no branches limitation
- For each attribute type you get a warning in intranet-error.log:
patron-attr-types.pl: Argument "" isn't numeric in numeric gt (>) at (...)/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt line 284.

To test:
- Appy patch
- Verify that warnings no longer appear in intranet-error.log

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit abb7980004ad75de4a51d06815f5e98e1cbb0f6d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit dc6ea8d5c9bc3e4e8e859511ef151be4061d1be5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16803: Add Font Awesome Icons to "Select/Clear all" links to shelves.tt
Hector Castro [Thu, 23 Jun 2016 16:35:24 +0000 (10:35 -0600)]
Bug 16803: Add Font Awesome Icons to "Select/Clear all" links to shelves.tt

Add Font Awesome Icons to "Select/Clear all" links to shelves.tt
(Public and private lists)

To test:
-Apply patch
-Go to More -> Lists
-Create some Public and Private Lists
-See the contents of the list and notice about the new icons in
 "Select/Clear  all"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3c80818f680278e595cf2a890b311db7866766a6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1d29e0488c2781e21b282f3ec4d61a7a4725bcdf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16779: Move road type after address in US style address formatting (main address)
Marc Véron [Mon, 20 Jun 2016 13:27:39 +0000 (15:27 +0200)]
Bug 16779: Move road type after address in US style address formatting (main address)

To verify:
- Create a patron with address, streettype, streetnumber defined
- Set syspref 'AddressFormat' to US style
- Go to patron's detail page (in staff client)
- In main address, road type preceeds address (e.g. 25 Drive Euclid)

To test:
- Apply patch
- Refrexh patron's detail page
- Verify that main address displays correctly (e.g. 25 Euclid Drive)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eb77861750cb3a2720e4a3a8003d526fa7d61552)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a6c80d1a0f6f5277f5f5c9528072dadc5f05825e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15929 - typo in explanation for MaxSearchResultsItemsPerRecordStatusCheck
Claire Gravely [Mon, 13 Jun 2016 22:25:03 +0000 (00:25 +0200)]
Bug 15929 - typo in explanation for MaxSearchResultsItemsPerRecordStatusCheck

There's a typo in the explanation for the new
MaxSearchResultsItemsPerRecordStatusCheck  sys pref that was added in 3.22.2.

"If a record has more than this number of items, they availability statuses
..."

I have re-worded the description so it reads a bit better.

Test plan:
1. Check the description for syspref MaxSearchResultsItemsPerRecordStatusCheck.
2. Apply patch
3. Check syspref MaxSearchResultsItemsPerRecordStatusCheck description
 to make sure it makes sense.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cae7e29cf27b3a751211dc71e1aeebe723153433)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ac83809da7b9109a60982acf23cf6bbf931b18ee)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t
Mark Tompsett [Thu, 7 Jul 2016 06:34:28 +0000 (02:34 -0400)]
Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t

By properly defining a opachtdocs (intranethtdocs was done too)
in the mock function, uninitialized variable warnings are
eliminated. Given that we can check if $KOHA_CONF is defined or
not, we can catch the warning as part of testing, so the output
of the test is cleaner.

TEST PLAN
---------
1) unset KOHA_CONF
2) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- lots of noise
3) apply patch
4) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- no noise
5) prove -v t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- see the warnings were caught and not just ignored.
6) run koha qa test tools

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No warnings. Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5ec641fbbb67501e2a71be64b12c9224caee1b55)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5129b29b02f1b4f586a0c6bc943f8cea8f605619)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16774: Format date on 'Transfers to receive' page to dateformat system preference
Marc Véron [Sun, 19 Jun 2016 15:43:19 +0000 (17:43 +0200)]
Bug 16774: Format date on 'Transfers to receive' page to dateformat system preference

To test:
- Apply patch
- Go to Home > Circulation > Transfers to receive
- Verify that in title (Transfer made to your library as of...) is
  is formatted as defined in syspref dateformat

Additionaly, the patch changes page title and breadcrumb from:
Home > Circulation > Transfers to your library
to:
Home > Circulation > Transfers to receive
...to make them consistent with the link text on the Circulation home page
   (Transfers to receive)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11dc97cfae96676ff1cc242e8a43ad513c36c6ef)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 82bbaf5212a0095008ce82d92bcac04839015ef2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 15636 - DataTables Warning: Requested unknown parameter from opac-detail.tt
Bouzid Fergani [Tue, 12 Apr 2016 13:27:18 +0000 (09:27 -0400)]
Bug 15636 - DataTables Warning: Requested unknown parameter from opac-detail.tt

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the same tests in the aoColumns DT definition than the
ones in the creation of the table. That's sound good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a12d3d1bfa00499a0b16d39f01136050de537449)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 57a727afa5b4a8fa9f7a8d4e4257c7e172ed1f6d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16859: Fix wrong item field name in export.pl
Marcel de Rooy [Wed, 6 Jul 2016 13:52:54 +0000 (15:52 +0200)]
Bug 16859: Fix wrong item field name in export.pl

Field callnumber should be itemcallnumber.
For completeness, prefixing the joined fields with items table prefix.

Note: You should expect Tools/Export to export only the items within a
given itemcallnumber range, but if the biblio has one item in that
range, the biblionumber is selected for export with ALL items. The script
is designed that way (first select biblio numbers based on criteria, and
run export with those biblio numbers).

Test plan:
[1] Select a biblio N with one item with say itemcallnumber X.
[2] Goto Tools/Export. Select biblio range N,N and no itemcallnumber
    range. The biblio should be exported.
[3] Select biblio range N,N and itemcallnumber range A,B. No output.
[4] Select biblio range N,N and itemcallnumber range A,<empty>. Output.
[5] Select biblio range N,N and itemcallnumber range <empty>,X. Output.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 00960f196482bb8dda3ddac8d9361ca1ffc5af93)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 58de933e0301451bbe3af107ee1359f72b15e286)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16855 - Poor performance due to high overhead of SQL call in export.pl
Nick Clemens [Tue, 5 Jul 2016 18:49:35 +0000 (14:49 -0400)]
Bug 16855 - Poor performance due to high overhead of SQL call in export.pl

This patch eliminates all columns retrieved in the biblioitems query
except for biblionumber.

To test:
1 - Go to tools->Export data
2 - Export using various filters and note you get expected records
3 - Apply patch
4 - Ensure exported results match results before patch

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a44bb07b88ba9d5049a64f88610a8bb8e82efe3a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0b40c96d2d7bb6e7f550698713fd4db7e6939960)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16854: request.tt: Logic to display messages broken
Marc Véron [Mon, 4 Jul 2016 01:48:40 +0000 (03:48 +0200)]
Bug 16854: request.tt: Logic to display messages broken

This patch fixes broken logic in
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

To verify, see initial comment.

To test:
- Apply patch
- Have a patron with a restricion and with outstanding fines
  greater than defined in syspref 'maxoutstanding'
- Place a hold for this patron and verify, that messages
  'Patron has restrictions' and 'Patron has outstanding fines...'
  appear

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44092cbafd1641ef865497183b8368db83bb62a7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e9840ac7956c4a8028575daab41303bc34457e0a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16780 - Specify due date always sets time as AM when using 12 hour time format
Kyle M Hall [Fri, 24 Jun 2016 10:35:25 +0000 (10:35 +0000)]
Bug 16780 - Specify due date always sets time as AM when using 12 hour time format

This regression is occurs because the time format for the checkout
date/time widget is only meant to be given in 24 hour format. The time
due should not be converted to 12 hr time even if the library has 12
hour set as their preferred time format.

Test Plan:
1) Performat a backdated checkout with a date due that has a PM time
2) Note the date/time picker on the confirmition screen shows the time
   in AM/PM
2) Note the time is not stored correctly
3) Apply this patch
4) Repeate step 1
5) Note the confirmation date/time picker now show the time in 24hr
   format
6) Note the time was stored correctly

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7c89f78f3bef1cdebb51dcb41fdda7a8dc252b94)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e0b29cea2ac3f32a8e1322ab680a0bcb513725a8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16762: Record matching rules: Remove match check link removes too much
Owen Leonard [Fri, 17 Jun 2016 15:33:41 +0000 (11:33 -0400)]
Bug 16762: Record matching rules: Remove match check link removes too much

My patch for Bug 5006 introduced a lot of markup changes to the record
matching rules template. I missed a change in one are though, which
caused a bug with the way the 'Remove match check' link works.

To reproduce:

- Go to Administration -> Record matching rules.
- Edit a matching rule which includes at least one match check.
- Click a 'Remove match check' link. The entire "Required match checks"
  block is removed.

To test, apply the patch and repeat the steps above. Clicking any
'Remove match check' link should remove only the corresponding rule.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ffcb360321f6abe111c3352606b4c641ac48950a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 071ce5aa26f362c017ced445320b9afcb1c8ee88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16760: fix Circulation Statistics wizard under Plack
Galen Charlton [Tue, 5 Jul 2016 16:22:39 +0000 (16:22 +0000)]
Bug 16760: fix Circulation Statistics wizard under Plack

This patch fixes some variable scoping problems when running
the circulation statistics wizard under Plack.  For example,
when using the item type as a row header, with this patch the
item type description is displayed rather than "UKNOWN VALUE".

This patch also enables warnings and fixes a couple variable
initialization issues. (Note that turning on warnings across
the board would make it easier to identify Plack variable scoping
issues, as "Variable "$foo" is not available at' errors would
be recorded in the Plack error log).

To test
-------
[1] Run the staff interface under Plack.
[2] Go to the Circulation Statistics Wizard and run a report
    using item type as the row. Note that the row labels
    display as "UNKNOWN VALUE" rather than the item type.
[3] Apply the patch and restart Plack.
[4] Run step #2 again; this time, the item type descriptions should
    be used as the row labels.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8ca55a7fb37ac50103de978f82408776fc06b7bb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 01b0fe1aa85364611b93eafd7f30a2665a228e3c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16459: Add patron to a patron card requires catalogue permission
Jonathan Druart [Fri, 6 May 2016 14:55:31 +0000 (15:55 +0100)]
Bug 16459: Add patron to a patron card requires catalogue permission

Currently, serials => 'routing' is required, which does not make any
sense.
It's a copy/paste error when this file has been created (you can blame
me).

Note that I am not sure catalogue is the correct permission, but it's
the one used almost everywhere in this module

Test plan:
Confirm that catalogue is enough to search for patrons to add to a
patron card.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3bb51d038639c7b197022a2c7c6ae864c834060f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 7c68f51d13499992c634775d5407ced89cc69a5b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14968 - Provides unit test
Alex Arnaud [Wed, 15 Jun 2016 14:11:07 +0000 (16:11 +0200)]
Bug 14968 - Provides unit test

Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1509322c9a813809ca453b476ea1163bbc9303ca)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ca08a21e4e8f3a24e636a47eddfab464352b6418)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 14968 - found shouldn't be set to null when cancelling holds
Lyon3 Team [Tue, 6 Oct 2015 13:42:15 +0000 (15:42 +0200)]
Bug 14968 - found shouldn't be set to null when cancelling holds

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 83328c1061af0ae82d8a2086e298375875e2dfa9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3bed66a3e2a9d9eafe69a19442e34413b4e9a399)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 12509 - Fix Untranslatable Restriction added by overdues process
Morgane Alonso [Mon, 6 Jun 2016 12:24:56 +0000 (12:24 +0000)]
Bug 12509 - Fix Untranslatable Restriction added by overdues process

Changes the value of the "comment" column in "borrower_debarments" table
from "Restriction added by overdues process yyyy-mm-dd hh:mm:ss" to
"OVERDUE_PROCESS yyyy-mm-dd hh:mm:ss" in the overdue_notices.pl. Then in
the templates "moremember.tt", "circulation.tt", "memberentrygen.tt",
"opac-reserve.tt" and "opac-user.tt" the value of "comment" is
check, if it's an automatical comment due to overdue process it'll
write "Restriction added by overdues process yyyy-mm-dd hh:mm:ss",
then if there is a customizable comment it will be written without
modification. Like this, the comment "Restriction added by overdues
process" is written in the po files and can be translated later.

To test:
1) create a patron with automatical restriction due to overdue process;
2) apply patch;
3) run misc/cronjobs/overdue_notices.pl;
4) verify if the comment "Restriction added by overdues process" is well
   written and translatable on the following page :
    - opac patron home page (opac-user.tt);
    - opac item reservation page (opac-reserve.tt);
    - pro patron page (moremember.tt);
    - reservation item for a patron (circulation.tt, memberentrygen.tt);
5) try to translate the comment in po files;
6) sign off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1285ba9c0f9a7020ba5f6e982dd2a5891ab9f63)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 17156342e629cea984c1ff411fc38a6b33512a42)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16772 - Change label from 'For:' to 'Library:' to ease translation
Marc Véron [Sun, 19 Jun 2016 16:10:06 +0000 (18:10 +0200)]
Bug 16772 - Change label from 'For:' to 'Library:' to ease translation

This patch changes the label from "For:" to "Library:" in the
acquisition information filter on the suggestions page in staff client.

To test:
- Apply patch
- Go to Home > Acquisitions > Suggestions management
- Verify that label reads as appropriate (in filter
  Acquisition information)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4747e6155efc9902003ae3ae4c14535fc7ece015)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 79744a3989e2e9bed9f06c2a0828524f8cb49115)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16770: Remove 2 other occurrences of libmemoize-memcached-perl
Jonathan Druart [Tue, 21 Jun 2016 11:36:38 +0000 (12:36 +0100)]
Bug 16770: Remove 2 other occurrences of libmemoize-memcached-perl

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 735789d71aa802385b282c79edad43d2a6fb58d6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 927498a007fe076feacfddefafc07e9cdbb8827d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16770: Remove Memoize::Memcached dependency
Jonathan Druart [Sat, 18 Jun 2016 14:22:35 +0000 (15:22 +0100)]
Bug 16770: Remove Memoize::Memcached dependency

This module is no longer in use and can be removed.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
This part involves some changes in a bunch of mysterious debian|ubuntu
related files, not quite sure if I know what I'm doing
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 67e6efab5d2da2c55d138153060c70cba342db7e)
(cherry picked from commit 998ea5d57a2311d63d53e13879e4194a141d4199)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages
Jonathan Druart [Sat, 18 Jun 2016 14:21:28 +0000 (15:21 +0100)]
Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages

Looking at this code, you might think these subroutines are cached, but
actually they are not.

The eval surrounding the code hides a bug, if you remove it, you will
get:
  Invalid memcached argument (expected a hash)

Test plan:
Do not apply this patch and confirm that the code does not work

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44fb6e72254391d38b7a66fa395bb9874a6d716c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0a09cb7d09e3dabd983d137dd7f86e08525a75fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16651: Notes field blank for 952$z in opac-course-details.pl
Nick Clemens [Mon, 6 Jun 2016 15:28:39 +0000 (11:28 -0400)]
Bug 16651: Notes field blank for 952$z in opac-course-details.pl

This patch changes course reserves to check for item notes form the
course reserve and fallback to itemlevel notes if they are empty

To test:
1 - Enabvle course reserves
2 - Add some items
3 - Make sure the items have notes at the item level and not at course
reserves
4 - Notes don't display in staff or opac
5 - Apply patch
6 - Notes display in staff and opac
7 - Add notes at course reserves level
8 - These override the item level notes

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 62508428cdf3a4c3da975ef5f88c8ece9cf50537)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d09b015e973c799cc392327484f3cc485a60ece2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16751: What is sitemaper?
Marcel de Rooy [Thu, 16 Jun 2016 11:03:30 +0000 (13:03 +0200)]
Bug 16751: What is sitemaper?

s/sitemaper/sitemapper/

Test plan:
Run t/db_dependent/Sitemapper.t

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3e566de51fe6f2e966158f97682f9a5aaecab974)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1db9defdec44a7dd2e1af9f3486b8cfed4e132b7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16718 - Translatability: Fix problems with sentence splitting by <strong> in...
Marc Véron [Mon, 13 Jun 2016 12:21:47 +0000 (14:21 +0200)]
Bug 16718 - Translatability: Fix problems with sentence splitting by <strong> in about.tt

This patch removes sentence splitting by <strong> tags in
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt for better translatability.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0712048030c44ba731780916935f6d9d352d4c0b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 992ac84f3e10d6f9bd54dc125eac75364e3c78de)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16697: Translatability: Fix problem with isolated "'s"in request.tt
Marc Véron [Thu, 9 Jun 2016 13:34:54 +0000 (15:34 +0200)]
Bug 16697: Translatability: Fix problem with isolated "'s"in request.tt

This patch fixes translation problems with tag-isolated 's in
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

The patch fixes it at two places. In consequence, some other texts
ares sigthly changed to make them look similar.

To test:
- Inspect code changes and verify that the new wording makes sense.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2289c8c93014b7d9c14444d121651277bcee6232)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4662519a09e64b6c4c86edbce883a55627694ca6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16742: (follow-up)Remove unused template subject.tt
Hector Castro [Thu, 16 Jun 2016 15:54:29 +0000 (09:54 -0600)]
Bug 16742: (follow-up)Remove unused template subject.tt

Delete extra useless comment line:
"# if its a subject we need to use the subject.tt"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a4f80ab223adc8bb3145a921153c578219e91f5d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 299f4e418df426d89d082ded792c45764d9db76a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16742: Remove unused template subject.tt
Marc Véron [Wed, 15 Jun 2016 12:28:31 +0000 (14:28 +0200)]
Bug 16742: Remove unused template subject.tt

The template koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/subject.tt
is not used and can be removed.

To test:
- Apply patch
- Verify that catalogue/moredetail.pl works as before (go to a
  biblio with items and click 'Items' in left hand menu)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cf441013a5b1f525c9be38e5f3a76e47925a3703)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a6843caa705493c81360647bddfe6a024bc0ae8c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16736 - Keep branch filter when changing suggestion
Fridolin Somers [Tue, 14 Jun 2016 15:05:58 +0000 (17:05 +0200)]
Bug 16736 - Keep branch filter when changing suggestion

When changing suggestion, the selected tab is kept.
The same should be done with the selected branch.

Test plan:
- Go to suggestions table : /cgi-bin/koha/suggestion/suggestion.pl
- Select a branch in Acquisition information > For
- Select a pending suggestion
- Change status as accepted
- Click on Submit
=> without patch, the table is no longer filtered by branch
=> with patch, the table is filtered by branch

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0c1fa2f93c30a363b8b6cf9eaf2a93979b61adf9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cc31338f260c8beb174491b9b634ef45dab5a39f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16644: Plack: Use to_app to remove warning about Plack::App::CGIBin instance
Marcel de Rooy [Fri, 3 Jun 2016 09:31:44 +0000 (11:31 +0200)]
Bug 16644: Plack: Use to_app to remove warning about Plack::App::CGIBin instance

Using Plack with the debian psgi file, I get lots of warnings like:
WARNING: Automatically converting Plack::App::CGIBin instance to a PSGI
code reference. If you see this warning for each request, you probably
need to explicitly call to_app() i.e.
Plack::App::CGIBin->new(...)->to_app in your PSGI file.

This patch is aimed to eliminate the warns.

Test plan:
Run Plack with plack.psgi or koha.psgi and verify if you do not see
these warnings anymore.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I tested on Jessie and I see no regressions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d69d874a3f749687c2ff9a8d2a400378dfc94ff6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8b15c8328bd7a104aac0900cdf88f1670f1b0c9e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16705 - Add missing status to serials history in OPAC
NguyenDuyTinh [Fri, 10 Jun 2016 10:14:12 +0000 (10:14 +0000)]
Bug 16705 - Add missing status to serials history in OPAC

The bug is related to 10851. Due to add of status in 10851, status added were
missing in opac-detail.tt and opac-full-serial-issues.tt. The patch just added
these missing status.

To test:
1) Create New subscription in Serials, in Intranet
2) Do a search of the new subscription by Title
3) Take Serial receive as Actions to edit the status to Missing (<something>)
4) Go to Opac and Search the subscription created, by its title and See missing status
5) Apply patch, status must be showed.
6) Sign off

Followed test plan, works as expected.
Amended to format commit title and message.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e1d6974bff1cc7290d792a4e6ac81e7d32b0c375)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d6484dfe2f94fe8ac1519c5ae2631dd96984a490)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16624: Fix regression displaying a letter with hours
Jonathan Druart [Tue, 7 Jun 2016 11:02:06 +0000 (12:02 +0100)]
Bug 16624: Fix regression displaying a letter with hours

Bug 13622 has introduced a bug, if pref TimeFormat is 12hr and a date is
displayed in both title and content of the letter.

Test plan:
1 - Checkout an item (with default time 11:59:00 PM)
2 - Generate a quickslip
3 - Notice the time is 'AM'
4 - Apply patch
5 - Generate quickslip
6 - Note time is correct

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6f0ce92543319d243cf185e3df9f91a9cf7f6d87)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 917054eaf63e656a521dc5742e2124a186d7c96c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16624: Add regression tests
Jonathan Druart [Tue, 7 Jun 2016 11:00:59 +0000 (12:00 +0100)]
Bug 16624: Add regression tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 47e41ea1c28a2aa265950e0645e402a3ac4c39d8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 91d6b787dd4e515b9c3b9f4444a3260e81f49121)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16612 - Cannot set "Until date" for "Enrollment period" for Patron Categories
Kyle M Hall [Fri, 27 May 2016 14:12:20 +0000 (14:12 +0000)]
Bug 16612 - Cannot set "Until date" for "Enrollment period" for Patron Categories

Attempting to set an "Until date" date for "Enrollment period" will
result in the date being accepted but not saved.

Test Plan:
1) Attempt to set an enrollment period until date for a new patron category
2) Note the period is not saved
3) Apply this patch
4) Attempt to set the enrollment period date again
5) This time it should save!

Signed-off-by: Andrew Brenza <abrenza@audubonlibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2af028bb13273d2b13f6e5cf417436fc0c8764f7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 90d3635fedb18acb652134e1541827a888e1bef5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16593: Do not allow patrons to delete search history of others patrons
Jonathan Druart [Thu, 26 May 2016 10:52:19 +0000 (11:52 +0100)]
Bug 16593: Do not allow patrons to delete search history of others patrons

A malicious user can delete the search history of all other users by
correctly guessing the ID value assigned to the victim's search. As
searches are assigned values sequentially, an attacker could quickly
remove the searches belonging to all of the application's users.

To reproduce:
Login with patron A
launch a search
Note the id generated for this search history:
select id from search_history order by id desc limit 1;
Login with patron B
Hit /cgi-bin/koha/opac-search-history.pl?action=delete&id=<ID>
Note that the row is deleted in the DB

Test plan
Confirm that this patch fixes the issue.
The same test can be made at the staff interface

Reported by Alex Middleton at Dionach

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f01720808a574af9872ef3f562a8f3cee7f81060)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0974bb38889dc5ca2b0abf68715a296d49087f3e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16527: Restore sticky due date behavior
Jonathan Druart [Sat, 21 May 2016 08:10:46 +0000 (09:10 +0100)]
Bug 16527: Restore sticky due date behavior

Bug 10067 has introduced a regression on the sticky due date behavior:
If "remember for session" is checked and the due date is changed from 1
checkout to another, the old due date will be used.

The code added by bug 10067 is really confusing and it's hard to say
this patch won't introduce another regression.
The manipulation of $restoreduedatespec, $duedatespec and $stickyduedate
is not easy to follow.

Test plan:
Confirm that the regression is fixed and that this patch will not
introduced a regression on bug 10067 (good luck!)

Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 33f1354b7b50390b43e5a2f66e1abe58817e6d4d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit cb2895592a59e181c6ceaff9b9cb3acaf5b4a2e4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: (followup) - Tidy AddIssue
Kyle M Hall [Fri, 17 Jun 2016 16:29:33 +0000 (16:29 +0000)]
Bug 16534: (followup) - Tidy AddIssue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f1fa65f6375b73b8e2aff3139885971f08bb27a3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 16d14e1467be8e738752bab80e731b51f4b2d846)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: (followup) Correct tiny typo
Marc Véron [Mon, 23 May 2016 05:48:10 +0000 (07:48 +0200)]
Bug 16534: (followup) Correct tiny typo

This patch corrects "...must be return..." to "must be returned..."

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fe02c9fdf0550caf0b9a7e0f4b1138260c94abc9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b067e2803bd46672309b2586dd3da25ab4906454)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: Block AddIssue from issuing if the return is not possible
Jonathan Druart [Sun, 22 May 2016 09:01:56 +0000 (10:01 +0100)]
Bug 16534: Block AddIssue from issuing if the return is not possible

To make sure the return can be done, AddIssue must not trust callers (they
should have done their job, but we are not sure) and check that the issue can
be returned before issuing to the patron.

There is no test plan here, this should not be possible from the Koha
interface.
However, looking at the code, it may be possible using SIP.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a9674fd3a8d8c898d8dc208d6e3d0296daeca40)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2cc01d139a9e24b320a12af485143670ed006e23)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: Add tests for AddIssue
Jonathan Druart [Sun, 22 May 2016 09:03:11 +0000 (10:03 +0100)]
Bug 16534: Add tests for AddIssue

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a879efb574028be78f0706f36bd5e1e11d54dfc2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e974de2c6942e83d2fd1ff52b7283c77f329798e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: Make CanBookBeIssued test if the issue can be returned
Jonathan Druart [Sun, 22 May 2016 09:01:48 +0000 (10:01 +0100)]
Bug 16534: Make CanBookBeIssued test if the issue can be returned

If an issue is already checked out, CanBookBeIssued must check if the
issue can be checked in before processing the return.
In such cases (depending of the AllowReturnToBranch pref), the issue
should not be allowed.

Prior to this patch, the checkin was not done and the checkout failed
with "Duplicate entry '1204321' for key 'itemnumber'". Indeed since bug
14978, there is an uniq key on issues.itemnumber. Before bug 14978 the
issue existed but was hidden (and some weird behaviors certainly
happened!).

To avoid Koha to crash, a check is added to CanBookBeIssued (call to
CanBookBeReturned) and the librarian is not able to process the
checkout.

Test plan:

- Set AllowReturnToBranch to anywhere
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Confirm the checkout (should work with and without this patch)

- Set AllowReturnToBranch to holdinbranch ("only the library the item
  was checked out from").
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Without this patch, Koha crashed
=> With this patch, you will be warned that the checkin is not possible.

Try other combinations of the AllowReturnToBranch syspref

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9427d44568e6d52fde3960bda3ad957ca6a5b7fe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit df9fbe0aefc7135ecf3e78c29a12cf780da28eae)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoBug 16534: Add tests for CanBookBeIssued & AllowReturnToBranch
Jonathan Druart [Sun, 22 May 2016 09:02:44 +0000 (10:02 +0100)]
Bug 16534: Add tests for CanBookBeIssued & AllowReturnToBranch

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c88538946e05feb65aa5b0f9007882a0ce6ac73)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 141ada91cc7de6e32e51ae5dfa203d4c89099c4e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoIncrement version for 3.22.9 release v3.22.09
Julian Maurice [Sun, 31 Jul 2016 08:50:35 +0000 (10:50 +0200)]
Increment version for 3.22.9 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoTranslation updates for Koha 3.22.9
Julian Maurice [Sun, 31 Jul 2016 14:36:26 +0000 (16:36 +0200)]
Translation updates for Koha 3.22.9

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
7 years agoUpdate release notes for 3.22.9 release
Julian Maurice [Sun, 31 Jul 2016 09:01:32 +0000 (11:01 +0200)]
Update release notes for 3.22.9 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16729: Use member-display-address-style*-includes when printing user summary
Marc Véron [Tue, 14 Jun 2016 05:07:05 +0000 (07:07 +0200)]
Bug 16729: Use member-display-address-style*-includes when printing user summary

This patch replaces the address part in moremember-print.tt to print identical
address information as displayed on the screen (including street numer, formatted as required by syspref 'AddressFormat'

To test:
- Apply patch
- Search for a user with all address information filled
- Verify that 'Print summmary' displays the same information
  as displayed on the screen.
- Change value of syspref 'AdressFormat'
- Verify that address format on 'Print summary' changes
  as appropriate

Signed-off-by: mehdi <mehdi@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 555f40626ab34eccadec66091e54e203a9be4440)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 546b95aee4fd4065090f4337a2e3e910f2767b39)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>