]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 17076 - Format fines in patron search results table
Marc [Mon, 8 Aug 2016 09:33:50 +0000 (11:33 +0200)]
Bug 17076 - Format fines in patron search results table

Format the values in patron search results following syspref CurrencyFormat.

To verify:
- Search for patrons who have fines or credits
- In result table, column 'Fines' does not respect syspref CurrencyFormat
  (e.g. for FR)

To test:
- Apply patch
- Repeat steps above, verify that fines display as appropriate
- Change syspref Currencyformat, verify display

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 6359922847aa9437bccc1d28fd429d5432517e9a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17081 Incorrect comparison operator used in edifactmsgs.pl
Colin Campbell [Mon, 8 Aug 2016 15:13:37 +0000 (16:13 +0100)]
Bug 17081 Incorrect comparison operator used in edifactmsgs.pl

Numeric comparison operator is used where string comparison required,
resulting in the following warning in the log: 'Argument "delete" isn't
numeric in numeric eq (==).'

This patch corrects it to use 'eq' not '==' to compare strings.

To test, apply the patch and go to Acquisitions -> EDIFACT messages.

Delete an EDIFACT message. There should be no error in the error log.

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 cc6fc0800cb3446ebe482b7dbb2f6ec4a543d869)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16969 cgi->param used in list context in opac-memberentry.pl
Chris Cormack [Sun, 24 Jul 2016 07:18:51 +0000 (19:18 +1200)]
Bug 16969 cgi->param used in list context in opac-memberentry.pl

To test
1/ Hit the page, notice the warning in the log
2/ Apply patch
3/ Hit page, notice no warning in the log
4/ Test functionality all still works

Works as expected. (Note: See Bug 16960 for updating patron details).
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0ef3b19dbd414539dbc8c45ecc595e399df31781)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17040: Fix translation on context menu when editing items
Jonathan Druart [Wed, 3 Aug 2016 14:48:42 +0000 (15:48 +0100)]
Bug 17040: Fix translation on context menu when editing items

Test plan:
update and install translated language files
On the item list (cataloguing/additem.pl) the context menu should be
translated (Edit item/Delete item)

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 72150ee7596e2644febbab248e6b3c9b7b3af69b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17020: Do no pass findborrower to the template
Jonathan Druart [Thu, 28 Jul 2016 11:58:30 +0000 (12:58 +0100)]
Bug 17020: Do no pass findborrower to the template

Indeed, it's not used!

Test plan:
  git grep '\[% findborrower'
should not return any result.

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 5995bd77a630521c360735b22c8573717515e62a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16894: Regression - Display email on patron search results
Jonathan Druart [Wed, 3 Aug 2016 15:41:48 +0000 (16:41 +0100)]
Bug 16894: Regression - Display email on patron search results

Bug 10318 added the email to the patron search results but it has been
removed later.
This patch reintroduced it where it was (no new column).

Test plan:
Search for patrons and confirm that the emails are displayed.

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 034f939a44287ae7078d95c15b55368aa98b4216)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16806: no error message for 'too_soon' renewal
phette23 [Thu, 23 Jun 2016 23:06:59 +0000 (16:06 -0700)]
Bug 16806: no error message for 'too_soon' renewal

To test:
-  for a particular item type & patron category, configure a non-zero
"no renewal before" date so items can't be immediately renewed
- sign in as a patron in aforementioned patron category
- check out an item of aforementioned item type
- go to your renewals page in OPAC /cgi-bin/koha/opac-user.pl
- an error messages appears in the div.alert.dialog up top

Sponsored-by: California College of the Arts
Signed-off-by: Brendon Ford <brendon.ford@manhattan.edu>
Signed-off-by: Irma Birchall <irma@calyx.net.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit aa2f56fa1a76d98ab9543a100810c354c4d23554)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16776: Do not forget external language choice in language switcher
Jonathan Druart [Mon, 25 Jul 2016 15:37:03 +0000 (16:37 +0100)]
Bug 16776: Do not forget external language choice in language switcher

If language is set by external link language switcher does not work

To reproduce:

- Have a multilingual koha installation, let's say en, de-CH, fr-FR and it-IT
- Create external links e.g. from your multilingual library website to each language variant of OPAC:

...cgi-bin/koha/opac-main.pl?language=en
...cgi-bin/koha/opac-main.pl?language=de-CH
...cgi-bin/koha/opac-main.pl?language=fr-FR
...cgi-bin/koha/opac-main.pl?language=it-IT

Each link opens fine displaying the language as appropriate.

Now try to switch language on the page you just opened via the external link.

It won't work, it will always stay on the language defined by the external link.

To test:
- Apply patch
- Repeat steps above
- Verify that the language switcher works
- Verify in browser address field that after switching language, the param 'language= 'has vanished from url string
- Try links with multiple params and with params containing 'language', e.g.
  ...cgi-bin/koha/opac-search.pl?language=fr-FR&q=language&mylanguage=test
- Verify that only the parameter 'language=' vanishes

Tested counter patch, works as well.
Signed-off-by: Marc <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 62d16aa6b750aaade2267596c19292659333f8c8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17082: Translatability: Fix sentence splitting in member.tt
Marc [Mon, 8 Aug 2016 15:47:31 +0000 (17:47 +0200)]
Bug 17082: Translatability: Fix sentence splitting in member.tt

This patch fixes sentences splitting in file
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt

Fix is done with a new .inc file because the code is the same as in
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

To test:
- Carefully review code changes
- Test on a fresh install without example data (or save database
  and test with empty tables 'branches' and 'categories')
- Go to Home > Patrons (members-home.pl)
- Verify that a warnings appears aubout missing libraries and patron
  categories
- Try to add a new patron (memberentry.pl)
- Verify that the same messages are triggered
- Verify that messages disappear as appropriate as soon as a library and
  a patron category are defined.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Note: Filed Bug 17093 for JS error on patron entry form.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5dd9a2546aea0870674bf2190a8f46c280b9beb2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16848: Prevent invalid warning to be carped from output_pref
Jonathan Druart [Mon, 4 Jul 2016 10:53:39 +0000 (11:53 +0100)]
Bug 16848: Prevent invalid warning to be carped from output_pref

From Koha::DateUtils::output_pref:

   $dt = eval { dt_from_string( $str ) } if $str;
   carp "Invalid date '$str' passed to output_pref\n" if $@;

This second line is wrong: if $str does not exist, the first line is not evaluated and $@ could be filled with previous error.

To reproduce:

Then:
  prove t/DateUtils.t
will display:
t/DateUtils.t .. 20/60 Use of uninitialized value $str in concatenation (.) or string at Koha/DateUtils.pm line 217.
Invalid date '' passed to output_pref
 at t/DateUtils.t line 233.
t/DateUtils.t .. ok
All tests successful.
Files=1, Tests=60,  2 wallclock secs ( 0.02 usr  0.00 sys +  1.40 cusr  0.00 csys =  1.42 CPU)
Result: PASS

Test plan:
Without this patch, you should not see the carp

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c31213ba4fab0082c6ad556aae424918b62205d0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17074: Follow-up: fixing encoding issues with multiple search terms
Katrin Fischer [Sun, 7 Aug 2016 23:15:23 +0000 (01:15 +0200)]
Bug 17074: Follow-up: fixing encoding issues with multiple search terms

If there was more than one search term you could see that that it
was url encoded. Also problems with search terms with umlauts and
other diacritics.

Patch should fix that.

https://bugs.koha-community.org/show_bug.cgi?id=17074
Signed-off-by: Marc <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 09d7a47f1fb1c645d0e3ffb93fb88409b3310363)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17074: Fix links in result list of 'scan indexes' and keep search term visible
Katrin Fischer [Sun, 7 Aug 2016 14:03:13 +0000 (16:03 +0200)]
Bug 17074: Fix links in result list of 'scan indexes' and keep search term visible

The 'scan indexes' search that can be reached from the
advanced search has 2 problems to begin with:

- The search term you searched for is not displayed
  in the input field.
- The links in the result list are missing the index
  and because of that, are not giving the correct results.

To test:
- Go to the advanced search, select an index to search in
- Enter a search term and check 'scan indexes'
- Submit search
- Check if the search term is visible in the input box
- Check if the result links contain your selected index
  and give you correct results (count and the number of
  results should match)

Tested both patches together, works as expected.
Signed-off-by: Marc <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 8d7e62b808522b1871d6b704e0ae5def3be886ee)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17053 Clearing search term in Reports
Frédéric Demians [Sat, 6 Aug 2016 08:13:18 +0000 (10:13 +0200)]
Bug 17053 Clearing search term in Reports

If you click the clear button to clear the search term it does take the search
term away. However, the next time you click on "Saved reports" the search term
is still there.

TO TEST:

1. Reports > Use saved
2. Filter on anything (date/author/keyword). Let say "foo" in keyword.
3. Click the Clear link on the Filter form. You can see that "foo" is removed
   from keyword, and all the saved reports are displayed.
4. Click "Saved Reports" on the left. You can see that "foo" reappears in
   keyword filter.
5. Apply the patch, and repeat steps 2-4.

Signed-off-by: Jesse Maseto <jesse@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 aa0e27ea08cf0d9a1ff46b061cc38d2b15fa66e7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17087 - Set Test::WWW::Mechanize version to 1.42
Mirko Tietgen [Tue, 9 Aug 2016 12:55:43 +0000 (14:55 +0200)]
Bug 17087 - Set Test::WWW::Mechanize version to 1.42

This was set to a version that is not available in Wheezy or Jessie.
The version is not required, the only change to 1.42 (packaged for
Wheezy and Jessie) is a fix for Windows, see
http://cpansearch.perl.org/src/PETDANCE/Test-WWW-Mechanize-1.44/Changes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 893f6cc2633744d4f539fd1b6b9f4b8837277d2d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 10148: Marc21 field 007 builder improper reload values
Mark Tompsett [Mon, 11 Apr 2016 03:18:26 +0000 (23:18 -0400)]
Bug 10148: Marc21 field 007 builder improper reload values

The more correct solution is fix that template file.
However, in the mean time, this works.

TEST PLAN
---------
 1) find a record
 2) edit record
 3) click value builder for 007
 4) change everything to pipes as much as possible.
    (use Motion Picture to get all 00-22 values)
 5) save
    -- should save just fine.
 6) click the value builder again
    -- OOPS! Bad reload.
 7) prove t/db_dependent/FrameworkPlugin.t
    -- NOISY 007 messages.
 8) apply patch
 9) click the value builder again
    -- good reload
10) prove t/db_dependent/FrameworkPlugin.t
    -- No noise related to 007.
11) run koha qa test tools.

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 22c851cc2fea3c3868f7643132392f0a34439c65)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17038: Fix XSS in catalogue/search.pl
Jonathan Druart [Wed, 3 Aug 2016 12:57:43 +0000 (13:57 +0100)]
Bug 17038: Fix XSS in catalogue/search.pl

Test plan:
Search for something like:
  \";alert(1)//135

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

Note that this fix the parameters idx, q and op

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b543fa74fe888b9e53cfc06ac58e2f7ac1689ae5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17036: Fix XSS in circulation.pl
Jonathan Druart [Wed, 3 Aug 2016 07:49:10 +0000 (08:49 +0100)]
Bug 17036: Fix XSS in circulation.pl

Test plan:
Enter the following in the "Check out" tab:
"><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: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 96a9c2715ee2e4388e105e86e221bc280e1d757f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17021: Fix XSS in circ/returns.pl
Jonathan Druart [Thu, 28 Jul 2016 12:01:43 +0000 (13:01 +0100)]
Bug 17021: Fix XSS in circ/returns.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: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 12b4c83f5a5c11af635cae83e6837ff80dc02da7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17025: Fix XSS in serials-search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:46:11 +0000 (14:46 +0100)]
Bug 17025: Fix XSS in serials-search.pl

Test plan:
Hit
  /serials/serials-search.pl?ISSN_filter="%2F><script>alert('XSS')<%2Fscript>&searched=1
  /serials/serials-search.pl?title_filter="%2F><script>alert('XSS')<%2Fscript>&searched=1

=> 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: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1ea1504c30c5c34dd763027caee55dcf359e94cf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17029: Fix XSS in catalogue/*detail.pl
Jonathan Druart [Tue, 2 Aug 2016 14:46:06 +0000 (15:46 +0100)]
Bug 17029: Fix XSS in catalogue/*detail.pl

Hit
  /cgi-bin/koha/catalogue/detail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/labeledMARCdetail.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: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f3a8e5a4117a0e95969ff2856dfcd95a6935ec55)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7441 - DBRev 16.05.02.003
Frédéric Demians [Wed, 10 Aug 2016 13:28:20 +0000 (13:28 +0000)]
Bug 7441 - DBRev 16.05.02.003

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7441: QA follow-up - Add note about missing NORMARC support
Katrin Fischer [Wed, 10 Aug 2016 05:15:03 +0000 (07:15 +0200)]
Bug 7441: QA follow-up - Add note about missing NORMARC support

Adds a note about missing support for NORMARC (only supports
MARC21 and UNIMARC) to the system preference text.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 821cb91a80942a85f4d22e6b1a8c700add7bab7d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7441 - Followup search results showing wrong branch [UNIMARC]
Jonathan Druart [Fri, 24 Jun 2016 15:08:23 +0000 (16:08 +0100)]
Bug 7441 - Followup search results showing wrong branch [UNIMARC]

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Playing with OPACResultsLibrary syspref, biblio with items having different
  home/holding library are displayed properly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 492d79a7df18efb294bd9bd9da5fa5b4efe1e592)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7441 - search results showing wrong branch?
Kyle M Hall [Thu, 2 Jun 2016 14:01:56 +0000 (14:01 +0000)]
Bug 7441 - search results showing wrong branch?

When you search in the OPAC it shows you the HOME branch on the location
in XSLT, but if you click through to the detail page it shows you the
CURRENT BRANCH in the holdings table which is very confusing to patrons.
I don't know what's the right solution - home or holding branch, but they
should be the same in both places for the patron's sake. If you do the same
search in the staff client you see the right branch info on the search results
and on the detail page.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Search the catalog, you search should include results with items
   that have different home and holding libraries.
4) The results should look the same as before the patch
5) Change the system preference OPACResultsLibrary to "current location"
6) Refresh your page of search results
7) The results show now show the holding library instead of the home library

Signed-off-by: Barbara Walters <bwalters@ncrl.org>
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 4db2e745e244bfc9e8315b4903c30e21142d9cb4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 6499: [QA Follow-up] Trivial adjustments
Marcel de Rooy [Thu, 20 Aug 2015 09:29:01 +0000 (11:29 +0200)]
Bug 6499: [QA Follow-up] Trivial adjustments

Removes commented line from bib1.att.
Adjust OCLC-number to Other-control-number in comment of ccl properties.
No need to explicitly add 035$a and $z if you index 035 completely in
record.abs as well as biblio-koha-indexdefs.xml.
Rerun koha-indexdefs-to-zebra.xsl on index defs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5b4259be9c237c7773f6af9f6c83894718be603d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 6499: Add Zebra index "Other-control-number" covering MARC21 035$a, 035$z and...
Barton Chittenden [Thu, 10 Jul 2014 13:54:56 +0000 (09:54 -0400)]
Bug 6499: Add Zebra index "Other-control-number" covering MARC21 035$a, 035$z and 035 (entire tag)

1) Apply patch
2) Make sure that you have a bib that has MARC21 035$a (and possibly also 035$z) populated.

pre 3) Replace all modified zebra files and restart zebra server

3) Rebuild zebra: misc/migration_tools/rebuild_zebra.pl -x -b -z
4) Add the following to the intranetuserjs syspref:

$(document).ready(function(){
    // Add Other Control Number to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="Other-control-number">Other Control Number</option>');
    }
});

5) Do an advanced search, select "Other Control Number" from the search menu, then add the Other Control Number in 035$a for the bib specified in step 1.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no koha-qa errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 84f51549c94a5f5fdc227e6febb472946ca2b71c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16793 [16.05] Add 3 missing css rules
Frédéric Demians [Tue, 16 Aug 2016 15:42:56 +0000 (17:42 +0200)]
Bug 16793 [16.05] Add 3 missing css rules

8 years agoBug 17043 - Readonly deps
Mirko Tietgen [Wed, 3 Aug 2016 17:31:16 +0000 (19:31 +0200)]
Bug 17043 - Readonly deps

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17043 - debian/list-deps fixes, 16.05 edition
Mirko Tietgen [Wed, 3 Aug 2016 17:11:15 +0000 (19:11 +0200)]
Bug 17043 - debian/list-deps fixes, 16.05 edition

This makes debian/list-deps ready for Debian Jessie
and adds small fixes I already use for package releases.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17019 - debian/changelog update
Mirko Tietgen [Tue, 2 Aug 2016 13:41:12 +0000 (15:41 +0200)]
Bug 17019 - debian/changelog update

This has not been updated for a while. I plan to add the stable
releases.

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 8102098fa6adea43e71c06641b2705c5b23f29be)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17030: Make REST api available on packages with plack enabled
Tomas Cohen Arazi [Thu, 4 Aug 2016 14:47:16 +0000 (11:47 -0300)]
Bug 17030: Make REST api available on packages with plack enabled

This patch is the starting point for making the REST api available
on Plack.

What it does:
- It creates the /api/v1/app.pl mount point in plack.psgi
- It enables the ProxyPass and ProxyPassReverse directives so it
  is reached through Plack.
- It sets rewrite rules so we can use the 'pretty' urls (i.e.
  /api/v1/patrons instead of /api/v1/app.pl/api/v1/patrons).

To test:
- Grab the following files, and put them in /etc/koha (overwrite the existing ones)
  debian/templates/apache-shared-intranet-plack.conf
  debian/templates/apache-shared-opac-plack.conf
- Tweak your /etc/koha/sites/kohadev/plack.psgi file so the API-related stuff
  is present on your file.
- Make sure Plack is enabled for the instance:
  $ sudo koha-plack --enable kohadev
  $ sudo koha-plack --restart kohadev
  $ sudo service apache2 restart
- Follow the previous patch test plan, but use this URLs (no pretty URL):

  http://localhost:8080/api/v1/app.pl/api/v1/patrons/50
  http://localhost:8081/api/v1/app.pl/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Not use this URLs:
  http://localhost:8080/api/v1/patrons/50
  http://localhost:8081/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Sign off :-D

[1] this patch made a bug visible (the session is lost when accessing the API through
Plack) but it shouldn't prevent its inclusion because the API right now is not even available
as default for developers to test or fix it.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e4bb70a447c7a6ea5e7498250adbe0e152259974)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17030: Enable REST api on packages
Tomas Cohen Arazi [Thu, 4 Aug 2016 14:39:25 +0000 (11:39 -0300)]
Bug 17030: Enable REST api on packages

This patch enables access to the REST API endpoint on packages setup.
It does so, by patching the shared apache-shared-intranet.conf and
apache-shared-opac.conf.

You can build your own master packages with this patch applied, or just:

- Grab
  debian/templates/apache-shared-intranet.conf
  debian/templates/apache-shared-opac.conf
and overwrite their counterparts in /etc/koha on a packages setup. For example
in kohadevbox.
- Have Koha loaded with all default data
- Create a superlibrarian user for you
- Login to the intranet and the OPAC
- Point your browser to:
  http://localhost:8080/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
  http://localhost:8081/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
- Sign off :-D

Note: I use the HTTPRequester addon for Firefox, re-using the CGISESSID value from the
browser session cookie, in the headers.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6e38b8b60f118c0721a52fdaa332446063657dd3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17065 - Rename C4/Auth_cas_servers.yaml.orig
Mirko Tietgen [Sat, 6 Aug 2016 11:52:26 +0000 (13:52 +0200)]
Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig

C4/Auth_cas_servers.yaml.orig gets cleaned away after every package build because
of the .orig extension. This patch moves it.

It is only a sample file, there is no functionality to test. Just verify that the
file is there with the new name after you applied the patch.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30474a321575ffecfd4e2578dce59385267ec8d7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17064 - Delete backup marc21_framework_DEFAULT.sql~ file
Mirko Tietgen [Sat, 6 Aug 2016 11:42:18 +0000 (13:42 +0200)]
Bug 17064 - Delete backup marc21_framework_DEFAULT.sql~ file

This .sql~ backup file should not have been committed.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3964fac311e59ade5fc79f4884626969716ae57f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17013 - build-git-snapshot: add basetgz parameter and update master version number
Mirko Tietgen [Mon, 1 Aug 2016 15:13:55 +0000 (17:13 +0200)]
Bug 17013 - build-git-snapshot: add basetgz parameter and update master version number

This adds a basetgz parameter to specify a pbuilder image.
I use this to build against different distributions.

This also updates the version number for master builds to 16.06.

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 bbaaabd1da97312e66e81b7ecfc37a5f5d2f828e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17068: empty <li> in opac-reserve.tt
Eric Phetteplace [Sat, 6 Aug 2016 17:44:53 +0000 (10:44 -0700)]
Bug 17068: empty <li> in opac-reserve.tt

empty HTML list item on 'holds' page, to test:
- sign in as user
- attempt to place hold
- view source in between 'holds note' textarea & <!-- ITEM HOLDS --> comment
- note empty <li>
- apply patch
- repeat process above up until patch
- no more empty <li>

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17a5ef51199736235f0c3fd35c84be124ecc166e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16585: Update Italian installer sample files for 16.05
Zeno Tajoli [Wed, 25 May 2016 12:41:01 +0000 (14:41 +0200)]
Bug 16585: Update Italian installer sample files for 16.05

With this patch all sample/defintions .sql files are updated and translated into Italian
(if you select italian during web installation).

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d0f2bad12e0f49bcedda3bdbc909642b93984d0b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16622: some tests triggered by prove t fail for unset KOHA_CONF
Mark Tompsett [Tue, 31 May 2016 16:01:46 +0000 (12:01 -0400)]
Bug 16622: some tests triggered by prove t fail for unset KOHA_CONF

TEST PLAN
---------
1) unset KOHA_CONF
2) prove t
   -- 00-load.t dies miserably
3) prove t/Creators.t
   -- fails
4) apply patch
5) prove t
   -- noisy, but all tests successful
6) prove -v t/Creators.t
   -- 2 skipped tests
7) run koha qa test tools

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6b3a04da6a2f137ad87e0d39e9cc2c5ab7958850)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17042: Fix missing column in hold.json
Lari Taskula [Wed, 3 Aug 2016 15:42:25 +0000 (18:42 +0300)]
Bug 17042: Fix missing column in hold.json

Swagger definition for hold was missing a property.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 2ea99517ae9cb081e6f15c786e0163368d25bfbd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17044: Fix wrong destination for 'api' directory
Tomas Cohen Arazi [Wed, 3 Aug 2016 17:34:12 +0000 (14:34 -0300)]
Bug 17044: Fix wrong destination for 'api' directory

The original Makefile.PL tweak missed to trim the directory name thus
repeating the 'api' directory like in 'api/api'.

To test:
- Make a standard install (for example in /usr/share/koha
=> FAIL: check /usr/share/koha/api/api exists
- Make a single install (for example in /home/tcohen/koha-single)
=> FAIL: check /home/tcohen/koha-single/api/api exists
- Apply the patch
- Make a standard install (for example in /usr/share/koha
=> SUCCESS: check /usr/share/koha/api exists and doesn't contain a nested 'api' dir
- Make a single install (for example in /home/tcohen/koha-single)
=> SUCCESS: check /home/tcohen/koha-single/api exists and doesn't contain a nested 'api' dir
- Sign off :-D

Note: this affects the packages too, as the standard install is used as a basis.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 72d92be918eae8a9bc3c6723c155d1b0c6ba25e4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17063 - debian/control.in update: change maintainer & add libhtml-parser-perl...
Mirko Tietgen [Sat, 6 Aug 2016 09:30:19 +0000 (11:30 +0200)]
Bug 17063 - debian/control.in update: change maintainer & add libhtml-parser-perl for 16.05.x

Changing the package maintainer and removing a whitespace in debian/control.in.
Regenerated debian/control from that, which also adds libhtml-parser-perl
because of bug 16971.

This one is for 16.05.x

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16830: (followup) Remove weird character from warning in rebuild_zebra.pl
Tomas Cohen Arazi [Tue, 28 Jun 2016 22:44:30 +0000 (19:44 -0300)]
Bug 16830: (followup) Remove weird character from warning in rebuild_zebra.pl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6122b8fe6ee73b9e0a26312507912d947c6d58f7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16830: Remove -x usage on koha-indexer
Tomas Cohen Arazi [Tue, 28 Jun 2016 22:41:54 +0000 (19:41 -0300)]
Bug 16830: Remove -x usage on koha-indexer

This patch just does that, and removes it from the comment on /etc/default/koha-common

To test:
- Apply the patch
- Run:
  $ vagrant ssh ; cd kohaclone
  $ sudo debian/scripts/koha-indexer --stop kohadev
  $ sudo debian/scripts/koha-indexer --start kohadev
=> SUCCESS: Verify no warning is shown on the indexer-output.log file
- Sign off

https://bugs.koha-community.org/show_bug.cgi?id=16830

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 87bcaa7df3fa8beca0dabed42c80930e70c3ece8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16727: Clarify upload category note
Nicole C Engard [Wed, 27 Jul 2016 13:27:37 +0000 (13:27 +0000)]
Bug 16727: Clarify upload category note

This patch clarifies the note on the upload tool
that states that no categories are defined.

To test:

* Log in to Koha
* Confirm that you have no values set for the UPLOAD
  authorized value category
* Visit Tools > Upload
* Check the warning note for typos
* Add a authorized value category for UPLOAD
* Visit Tools > Upload
* Confirm that note is replaced

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ebaa3543d6278fe31886310cda5b10c807e6ad8a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t
Mark Tompsett [Wed, 6 Jul 2016 18:17:20 +0000 (14:17 -0400)]
Bug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t

prove t/db_dependent/ILSDI_Services.t
generates noisy output as a result of the ambiguous context
of two $cgi->param() calls.

By storing into scalar variables, and then using the scalar
variables, the code maintains readability and fixes the problem.

TEST PLAN
---------
1) prove t/db_dependent/ILSDI_Services.t
   -- noisy.
2) apply patch
3) prove t/db_dependent/ILSDI_Services.t
   -- not noisy
4) run koha qa test tools

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ef0738922005e4235b80e70663d7fa711a87556e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16868: Silence error t/db_dependent/Linker_FirstMatch.t
Mark Tompsett [Thu, 7 Jul 2016 01:37:21 +0000 (21:37 -0400)]
Bug 16868: Silence error t/db_dependent/Linker_FirstMatch.t

When the auth_header table has records which exclude 1xx and
2xx tags, the $bibfield doesn't match anything. This in turn
sets it to undef, which triggers an error on the next line
killing the test.

This was completely refactored to provide the data necessary
for the tests to pass, and to be more comprehensive (both MARC
and UNIMARC are tested). The tests are then run.

C4::Headings::authorities is mocked, so that this test is not
dependent on a search engine.

TEST PLAN
---------
1) back up DB
2) DELETE FROM auth_header;
3) SOURCE auth_header.sql;
   -- the provided file
4) prove t/db_dependent/Linker_FirstMatch.t
   -- should barf before running all the tests
5) apply all patches
6) prove t/db_dependent/Linker_FirstMatch.t
   -- should work happy
7) run koha qa test tools
8) restore your backup

Followed test plan, behaves as expected.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1be7fb5e12f0dd3911bb182ef2c0740c481337ec)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting...
Marc Véron [Tue, 5 Jul 2016 05:14:26 +0000 (07:14 +0200)]
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt

In koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt,
fix line splitted TT directives and sentence splitting leading
to translatability problems. (See first comment).

To test:
- Apply patch
- Go to detail pages of biblios with waiting holds
- Verify that messages in column 'Status' are OK
- Examine code in patch to make sure that the simplification in logic
  makes sense and that no TT directive is splitted
- Bonus test:
  - Go to folder misc/translator. Run perl translate create xx-XX
  - Verify that monster mentioned in first comment no longer exists
    (in po/xx-XX-staff-prog.po)

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

Amended for wording (comment #5) 2016-07-26 mv

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 13004a8c649f1098f1ddd3be5a02b75bad27f3d8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16971: Missing dependency for HTML::Entities
Marcel de Rooy [Fri, 22 Jul 2016 09:48:21 +0000 (11:48 +0200)]
Bug 16971: Missing dependency for HTML::Entities

This module is already used in opac-password-recovery.pl.
It is loaded in Acquisition, but not used (anymore?).
It is not yet listed in PerlDependencies.

Note: The module is packaged for Debian Wheezy and Jessie.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 92626f55c88661d1e5b8dea57bdca412df004123)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16818: External auth redirect broken under Plack
Jesse Weaver [Fri, 8 Jul 2016 22:01:19 +0000 (16:01 -0600)]
Bug 16818: External auth redirect broken under Plack

Test plan:

0) Have either CAS or Shibboleth authentication enabled under Plack.
1) Hover over the authentication link on the staff client or OPAC, and
   notice that it has either '.../opac/...' or '.../intranet/...' instead
   of '.../cgi-bin/koha/...'. (This will be a complete dealbreaker for CAS
   authentication.)
2) Apply patch.
3) Check links again; they should now have the correct paths.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not test CAS or Shibboleth, but no regression found.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d475dae77313e8f0ee11146ce824d019351cbc5f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 11490 - DBRev 16.05.02.002
Frédéric Demians [Fri, 24 Jun 2016 11:53:02 +0000 (11:53 +0000)]
Bug 11490 - DBRev 16.05.02.002

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 11490: Split MaxItemsForBatch into 2 prefs to clarify things
Jonathan Druart [Wed, 11 May 2016 13:10:49 +0000 (14:10 +0100)]
Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things

Prior to this patch, a single pref (MaxItemsForBatch) was used to
restrict the use of the batch item modification and deletion.

On the batch modification tool, the pref is used to limit the number of
items a librarian is allowed to modify in a batch, but on the batch
deletion tool the pref is used to limit the number of items to display.

To clarify things, this patch split the pref into 2 new prefs:
MaxItemsToDisplayForBatchDel and MaxItemsToProcessForBatchMod.

Later we could add a MaxItemsToProcessForBatchDel if needed.
Note that this patch should not introduce any changes in the current behaviors.

Test plan:
0/ Do not execute the update DB entry
1/ Set a value != 1000 for MaxItemsForBatch
2/ Execute the update DB entry and confirm that the 2 new prefs are
initially set with the value of MaxItemsForBatch and that
MaxItemsForBatch has been deleted
3/ Set different values for these 2 prefs (2 and 3 for instance to ease
the next steps)
4/ Try to delete less than MaxItemsToDisplayForBatchDel items
=> You must see the items details
5/ Try to delete more than MaxItemsToDisplayForBatchDel items
=> You must not see the items details but are allowed to delete them
6/ Try to modify less than MaxItemsToProcessForBatchMod items
=> You must see the items details
7/ Try to modify more than MaxItemsToProcessForBatchMod items
=> You must be restricted and not allowed to process

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b2c55ecdd7ad128c7ec923e70b13b1f287c7d00)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 11490: Add prefs MaxItemsToProcessForBatchMod and MaxItemsToDisplayForBatchDel
Jonathan Druart [Wed, 11 May 2016 13:10:41 +0000 (14:10 +0100)]
Bug 11490: Add prefs MaxItemsToProcessForBatchMod and MaxItemsToDisplayForBatchDel

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 20f42350488ccd2795af3863ab1954d22b92eeae)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 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>
8 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>
8 years agoBug 17023: Fix XSS in acqui/z3950_search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:15:09 +0000 (14:15 +0100)]
Bug 17023: Fix XSS in acqui/z3950_search.pl

Test plan:
Enter the following in the different inputs:
<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 eb543a90848b97d35aa15052c8881134926a3ed0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 17023: Fix XSS in cataloguing/z3950_search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:06:41 +0000 (14:06 +0100)]
Bug 17023: Fix XSS in cataloguing/z3950_search.pl

Test plan:
Enter the following in the different inputs:
<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 f6e0a619d974fe002ec6a920206c7bc2808bce26)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 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>
8 years agoBug 16436 [QA Followup] - Use debug instead of info
Kyle M Hall [Wed, 6 Jul 2016 12:50:08 +0000 (12:50 +0000)]
Bug 16436 [QA Followup] - Use debug instead of info

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bcf7268f4f37ead02db8bc2da457ddfc9ce425c0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16436 - Allow action logs to be logged to the koha log file
Kyle M Hall [Tue, 3 May 2016 18:58:57 +0000 (18:58 +0000)]
Bug 16436 - Allow action logs to be logged to the koha log file

Test Plan:
1) Ensure that your Koha::Logger configuration is in good working order
2) Apply this patch
3) Modify the first line of your log4perl.conf file from:
    log4perl.logger.intranet = WARN, INTRANET
   to
    log4perl.logger.intranet = INFO, INTRANET
4) Change a system preference setting
5) Note the new line in your log file!

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 ce8c55fba055e856af406587894c6d67c68bc681)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16310 - Remove the use of "onclick" from audio alerts template
Owen Leonard [Wed, 20 Apr 2016 14:29:03 +0000 (10:29 -0400)]
Bug 16310 - Remove the use of "onclick" from audio alerts template

This patch removes one use of "onclick" in favor of defining events in
the JavaScript.

This patch also makes changes to the style of some buttons to make the
interface a little more consistent with current practices.

To test, apply the patch and go to Administration -> Audio alerts.

- In the list of existing audio alerts, click the "Edit" button for any
  alert. The correct data should be loaded in the edit form.

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 fcd139b22239206142809993cf9e328a3cdce38d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 years agoBug 16573 - DBRev 16.05.02.001
Frédéric Demians [Mon, 1 Aug 2016 09:54:30 +0000 (09:54 +0000)]
Bug 16573 - DBRev 16.05.02.001

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 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>
8 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>
8 years agoRevert "Bug 16917 - Error when importing patrons, Column 'checkprevcheckout' cannot... v16.05.02-01
Frédéric Demians [Wed, 3 Aug 2016 06:24:03 +0000 (08:24 +0200)]
Revert "Bug 16917 - Error when importing patrons, Column 'checkprevcheckout' cannot be null"

This reverts commit 878402689eb652b09bed0d4f2c7e458d5c5493f4.

8 years agoBug 17017 Dependency fixes for 16.05
Mirko Tietgen [Mon, 1 Aug 2016 16:08:38 +0000 (18:08 +0200)]
Bug 17017 Dependency fixes for 16.05

Things I did for 16.05.02. Should go in 16.05.03.

Adds to PerlDependencies.pm:

IO::Socket::IP
Readonly
Readonly::XS

Adds overrides to debian/list-deps:

IO::Socket::IP => 'perl-modules (>= 5.20.0) | libio-socket-ip-perl'
Swagger2 => 'libswagger2-perl (>= 0.59)'

and an up to date debian/control based on that.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoTranslation for 16.05.02 v16.05.02
Frédéric Demians [Mon, 1 Aug 2016 13:54:23 +0000 (15:54 +0200)]
Translation for 16.05.02

8 years agoVersion 16.05.02
Frédéric Demians [Mon, 1 Aug 2016 11:53:06 +0000 (13:53 +0200)]
Version 16.05.02

8 years agoBug 16945: PatronSelfRegistration: Add note about setting PatronSelfRegistrationDefau...
Marc [Wed, 20 Jul 2016 14:54:34 +0000 (16:54 +0200)]
Bug 16945: PatronSelfRegistration: Add note about setting PatronSelfRegistrationDefaultCategory

In OPAC, patron self registration works only when
PatronSelfRegistrationDefaultCategory is set to a valid patron category.

This patch adds a note for
PatronSelfRegistration on Home > Administration > System preferences.

To test:
- Apply patch
- In staff client, search system preferences for PatronSelfRegistration
- Verify that note appears with PatronSelfRegistration

(Amended to fix typo, see comment #3, 2016-07-21 mv)

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 856f4426b33ad498bfeed3a58097276e85850bab)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16906: Simply remove the sDom definition to use the default one
Jonathan Druart [Wed, 20 Jul 2016 14:18:18 +0000 (15:18 +0100)]
Bug 16906: Simply remove the sDom definition to use the default one

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 278eb01bbabad1f30cf4a15e09f9360d20ea4718)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16906 - Add DataTables pagination and filter to top of saved SQL reports table
Owen Leonard [Tue, 12 Jul 2016 18:07:18 +0000 (14:07 -0400)]
Bug 16906 - Add DataTables pagination and filter to top of saved SQL reports table

This patch adds a DataTables toolbar to the top of the saved SQL reports
table so that pagination and filtering controls are at the top as well
as the bottom.

To test, apply the patch and go to Reports -> Saved reports. There
should be controls at the top of the table of saved reports for setting
number of results, pagination, and searching.

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 1614787d0210d55ab77b9ee2500ac16da2bf6854)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16847: Add empty option to Salutation/title
Jonathan Druart [Mon, 4 Jul 2016 14:06:18 +0000 (15:06 +0100)]
Bug 16847: Add empty option to Salutation/title

At the OPAC there is no way to empty this value.
I think it should be allowed to empty it.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1766b10d525819629219ee5f34a1201a6dadc7fa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16847: Remove C4::Members::GetTitles
Jonathan Druart [Mon, 4 Jul 2016 14:03:18 +0000 (15:03 +0100)]
Bug 16847: Remove C4::Members::GetTitles

This subroutine just reads the content of a pref, split it, add an
empty string and returns.
It is not really useful and the code in the script (memberentry.pl) uses
the only occurrence of CGI::popup_menu
Let's remove it and build the dropdown list in the template.

Test plan:
1/ Empty BorrowersTitles, edit a patron and confirm that the "Salutation"
does not appear
2/ Fill BorrowersTitles with "Mr|Mrs|Miss|Ms", edit a patron and confirm
that the "Salutation" dropdown list is correctly filled.
The default option should be selected if you are editing a patron with a
title defined.
This should also be tested at the OPAC.

Followed test pan, works as expected in Staff and OPAC
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 131002e6230f2b69f0d6007b75fbc90444745b68)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7143 : More new devs
Chris Cormack [Mon, 4 Jul 2016 21:12:24 +0000 (09:12 +1200)]
Bug 7143 : More new devs

confirmed dates against emails and downloads.koha-community.org
Two names added correctly.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a975fb1b2ab3d57cdadee3cefdba2a9d1a882713)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7143 : Adding new developers
Chris Cormack [Mon, 20 Jun 2016 20:39:34 +0000 (08:39 +1200)]
Bug 7143 : Adding new developers

Claire Gravely seemed to be a cut and paste error.
June 3 better matches git log.
Three other names in history are in about as well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5c0485c918679d8adb1be5597f9b8d7a28072e45)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 7143: [QA Follow-up] Adjusting developer information
Marcel de Rooy [Mon, 13 Jun 2016 06:36:48 +0000 (08:36 +0200)]
Bug 7143: [QA Follow-up] Adjusting developer information

For consistency we should not only add firstnames to the list of
developers in about.tt and history.txt.

Adding some surnames with the help of git log and Bugzilla. Also
corrected a closing li tag.
Note that I did not find one surname: Natasha of Catalyst Academy.
Probably Chris could add that missing piece.

NOTE: Natasha piece still needs clean up.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 75caa1bef4e90f9b40fe4ae06fc49abfe0b933cf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 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>
8 years agoBug 16947: Can not modify patron messaging preferences
Marc [Thu, 21 Jul 2016 08:22:57 +0000 (10:22 +0200)]
Bug 16947: Can not modify patron messaging preferences

To verify:
- Set syspref 'EnhancedMessagingPreferences' to 'Allow'
- In staff client, go to a patron's detail page
- Edit Patron messaging preferences (using link below table)
- Save
Result: Form does not save, stays open
JavaScript error in intranet-tmpl/prog/js/members.js line 107
TypeError: document.form.password is undefined

To test:
- Apply patch
- Repeat steps above
- Verify that messaging preferences save as expected
- Verify that other patron modifications work as before

NOTE: remember to force reload of the javascripts.

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 87d96b973aa19e0808070d4b0fdd6485e5c83181)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 years agoBug 16876: Remove Full Heading column from OPAC Auth search results
Aleisha [Thu, 7 Jul 2016 23:40:29 +0000 (23:40 +0000)]
Bug 16876: Remove Full Heading column from OPAC Auth search results

To test:

1) Go to Authority Search and do a search
2) Notice that there is a Full Heading column that has 'View full
   heading' links. These take up a lot of space and don't mean a lot to
   the user
3) Apply patch and refresh
4) Notice that the the Full Heading column is gone and there is now a
   Details column next to the authorities. Confirm the link takes you to
   the expected authority detail page.

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 59d8f3f8617070ec29159ee3c2e0400e9214e4d4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16681 - Allow update of opacnote via batch patron modification tool
Nick Clemens [Thu, 14 Jul 2016 15:45:54 +0000 (11:45 -0400)]
Bug 16681 - Allow update of opacnote via batch patron modification tool

To test:
1 - Select a batch of patrons (via list, saved file, and cardnumber
        entry)
2 - Verify you cannot edit 'opacnotes' field, nor can you see
'borrowernotes' field in table, though you can edit it
3 - Verify editing works as expected
4 - Apply patch
5 - Select a batch via each method as above
6 - Note both note columns display in table
7 - Note that you can edit or clear the opacnotes field as expected
8 - Verify other feautres work as previously

Sponsored by:
   Lancaster Theological Seminary (https://lancasterseminary.edu/)

Followed test plan, works as expected.
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 81a9e7c88ee44fdfdd2f4f19b52150ce7176b1b7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 16538: Improve the style of progress bars
Owen Leonard [Tue, 17 May 2016 15:18:14 +0000 (11:18 -0400)]
Bug 16538: Improve the style of progress bars

This patch updates the style of progress bars to make them a little
nicer. Progress bars in the staff client are not built in a consisten
way. Some have been updated to use the <progress> element and some have
not. This patch improves some styling common to both kinds.

Other changes:

- Redundant in-page CSS has been removed from many pages.
- An invalid "min" attribute has been removed from several instances of
  <progress>.
- Corrected capitalization.
- Fixed incorrectly quoted attributes.
- Added missing form "action" attributes.

To test, clear your browser cache if necessary. Apply the patch and
test uploads on the following pages:

- Circulation -> Offline circulation file upload
- Tools -> Batch item modification
- Tools -> Batch record modification
- Tools -> Stage MARC records for import
- Tools -> Manage staged MARC records
- Tools -> Upload local cover image
- Tools -> Upload

In all cases, progress bars should look improved and work correctly.

Test Tools -> Batch item deletion. Unused background job handling markup
has been removed. Deletion processing should work correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works 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 65b2da08c9edaa6d2afe83ca7a5b72000128ecbe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 years agoBug 15853 - Add author and link columns to opac course reserves table
Nick Clemens [Fri, 3 Jun 2016 18:49:25 +0000 (14:49 -0400)]
Bug 15853 - Add author and link columns to opac course reserves table

To test:
1 - Add some course reserves
2 - View the table in staff and opac, there is no column for author or
link
3 - Apply patch
4 - You shoudl see these columns
5 - Link should contain item uri if present, fallback to title 856$u,
  then be blank if niether

Sponsored by:
    Southeastern Wisconsin Information Technology Exchange, Inc (SWITCH)
    (http://caspian.switchinc.org/)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Might be good to add this table to the column visibility tool if you
plan to add more columns.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b89a601e5742b3067fa6ed508313acfce4e73e73)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>
8 years agoBug 16812: Revise JS script for z3950_search.tts and remove onclick events
Hector Castro [Fri, 24 Jun 2016 21:55:40 +0000 (15:55 -0600)]
Bug 16812: Revise JS script for z3950_search.tts and remove onclick events

Modify JS script to all templates for z3950_search.tt and reduce the
redundant code

This patch propose:
-z3950_auth_search.tt has various onclick events used in links.
 Also fix: acqui/z3950_search.tt and cataloguing/z3950_search.tt
-Trigger onclick events via JQuery .on()
-Make a separate .js and .inc file
-Reduce the number of line and redundant code
-Also add Font Awesome Icons to "Select/Clear all" and "Clear search
 form" links

To test:
1-Apply bug 16600 on top
2-Apply patch
3-Go to Authorities > click New from Z39.50
4-Fill some fields and click in "Clear search form" link
5-Search under "Dalton" or another author that launch too many headings
6-Clic in some heading and notice the dialog open, test: "Preview MARC",
  ISBD (when showed), "Import" and close the dialog "X". Use the
  "Import" from table too.
7-Use the "next/previous page" button, change "Go to page" to number in and
  out of the range presented, also test whit a letter, etc.

Go to Cataloging > New from Z39.50/SRU
Repeat steps 3 to 6. But this time with bib records.

Go to Adquisition > Open or Create a basket and choose to "Add to basket"
button. A modal appear, chose the option "Order from external source"
Repeat steps 3 to 6. But this thime with bib records.

NOTE: The icon trash for "Clear search form" has been selected according
with module "Advanced search" there is an icon trash with link "Clear
fields" that has the same fuctionality.
For some reason the image loading-small.gif does not charge all times
when the code is get out of the template. (Fixed with this new patch)
DataTable it is specific for each template

Sponsored-by: Universidad de El Salvador
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 f240a91640234bf0f4e3bf6162c8fe3389db4ec2)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 years agoBug 16701: (follow-up) improve some changes
Hector Castro [Thu, 7 Jul 2016 15:13:30 +0000 (09:13 -0600)]
Bug 16701: (follow-up) improve some changes

Add missing quote in line 152
Modify title of the page and breadcrumbs section wrong "searchfield" used
should be instead "currency.currency"

To test
-Try to delete the active and used currency, for example, my case
 USD, look that appear USD' with the initial single quote missing in
 message Confirm deletion of currency USD'
-Notice about the breadcrumbs section appear:
     Confirm deletion of currency ''
 Should appear the currency
-Try to delete another currency see the pharese look the same
-Notice about the title in both cases, there is missing the currency name
-Apply follow-up and re-test

Sing-off on followup
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 4f2dba105e45446448f250356b5ec1cb74085dfd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 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>
8 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>