Commit graph

3531 commits

Author SHA1 Message Date
Janusz Kaczmarek
e653e8ce0b Bug 6470 - Unable to filter out log entries for kohaadmin (user 0)
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-05 11:22:46 +12:00
Chris Nighswonger
ae48ebbcaa Bug 5379 - import_borrowers.pl fails with db insert/update errors
Some spreadsheet programs use smart quotes which causes the db to throw
an error when an insert/update is attempted due to improper processing
of the CSV file. This patch adds code to check for smart quotes and change
them to "dumb" quotes.

This patch also adds more logging of errors and a notice to the user to check
the logs for errors when they occur.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-05 11:15:00 +12:00
Magnus Enger
610457ea41 Bug 6450 - No check in/check out messages in message_queue
Huge thanks to Katrin Fischer for spotting what was the trouble here!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
2011-07-03 08:55:49 +12:00
Robin Sheat
785af7310d Bug 6521 - allow blank cardnumbers to not trigger "already in use"
Now a blank cardnumber will get stored as a null in the database, which
is a value that allows duplicates. As such, if cardnumbers aren't
mandatory, then you can actually save a user with it being blank.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-26 02:26:11 +12:00
Ian Walls
26965cf1df Bug 6525: hold filled emails not going out
When the message name was updated from "Hold Filled" to "Hold_Filled" for T::T compatibility,
the line in _koha_notify_reserve that looked up the letter code by the message name no longer
matched, so none of the messages were sent.  This patch just replaces the space with an underscore
to get the names aligned properly.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-25 01:53:39 +12:00
Jeremy Crabtree
7bb178e30b Bug 5094 auth_by_bind authentication can fail even if given a correct password and userid
When using

<replicate>0</replicate> <!-- add new users from LDAP to Koha database -->
<update>0</update> <!-- update existing users in Koha database ->
<auth_by_bind>1</auth_by_bind> <!-- set to 1 to authenticate by
binding instead of password comparison, e.g., to use Active Directory -->

Auth_with_ldap attempts to lookup the userid in the LDAP directory to
fill $userldapentry despite it being unneeded in this case.  The information
retrieved will be thrown away, thus there is no need to retrieve it.
This can cause authentication to fail overall even if the initial bind with the
user's credentials succeeded

Signed-off-by: Joe Atzberger <ohiocore@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-17 15:05:59 +12:00
Dobrica Pavlinusic
322a5ef481 Bug 4993 checkpw_ldap - do bind just once
When using auth_by_bind, search was always done as anonymous user.
This is a problem if we want to fetch LDAP values which have ACL
permissions only for users.

This change moves bind from search_method back into checkpw_ldap,
making code cleaner and easier to understand

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-17 14:32:47 +12:00
Colin Campbell
2ab00242d0 Bug 6050 Make calls to GetItemsInfo consistent
Do not misleadingly document or pass an unused second parameter
makes all calls use the single parameter call as the C4
routines already did

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-14 14:12:02 +12:00
d2f49e1976 bug 5653: use itemcallnumber in bib label layouts
The sample bib label layouts and the hard-coded default
format_string for new layouts used 'callnumber' when they
should have used 'itemcallnumber', preventing call numbers
from being printed on spine labels that use the system-supplied
layouts.  Besides correcting the sample data, this patch
now also enshrines 'callnumber' as an alias for 'itemcallnumber'.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
After applying patch it works for new and old layouts (itemcallnumber and callnumber).

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-13 11:15:34 +12:00
Fridolyn SOMERS
98f2780227 BUG4319 waiting items cannot be reserved
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-13 11:08:47 +12:00
Frédérick Capovilla
ecda6f7305 Bug 6355: Correct GetLateOrders so it ignores cancelled orders
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Testing plan copied from bug:
- Create a new basket for a bookseller
- Create two new order in this basket. The orders must have a price or else
they won't be shown in the "Late orders" report.
- Delete one of the two orders.
- Close the basket
- Check for late orders and use "0 days ago" as a filter date.
- The deleted item appears in the report.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-10 15:42:30 +12:00
a13194f2cd Fix for Bug 6402, Lists sorted by year appear to be empty
If you create a list, populate it with titles, and then change the sort to
"year" it will appear as if your list is empty. The SQL in VirtualShelves.pm's
GetShelfContents tries to accept "year" as a sort by but 'year' is not a valid
column name.

The SQL pulls biblioitems.publicationyear. Changing this to
'biblioitems.publicationyear as year,'

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-10 12:14:52 +12:00
Srdjan Janković
5829cef6d8 bug_6433: exception handling
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
2011-06-10 11:27:25 +12:00
Magnus Enger
a54716e50d Bug 6459 : Needless call to C4::Context->dbh in C4::Templates::themelanguage()
As far as I can tell, $dbh is never used again in the scope in which it is
created. This patch simply removes the line.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-10 11:16:36 +12:00
Chris Nighswonger
939d0ab639 Bug 2246 - (Partial) Label printing doesn't work with Unicode characters
This patch provides a very partial fix for this bug in that it reduces
the number of pdf generation failures due to a "wide character" error.
It does not ensure that all unicode characters will print correctly as
this is dependent upon many other issues mentioned in this bug and
various posts to the developer list.

What this code does is test to see if the pdf stream is utf8 encoded
and if it is, explicitly declares it to be so. Unicode chars will still
print incorrectly, but the pdf will be created and should open properly
in whatever pdf reader.

You may test this by adding any character with a diacritical to the
title of a bib and then attempting to generate a label pdf with the
title of that bib. Before the patch is applied the resulting pdf
should contain an error mentioning a wide character issue. After the
patch is applied, the pdf should be valid.

No documentation changes are necessary as a result of this patch.

This patch should be backported to 3.2.x.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 20:03:10 +12:00
Ian Walls
5ae3a3aa4f Bug 5929: use branch admin email for advance_notice.pl emails
This squash commit takes the two patches from Srdjan and adds a minor fix to work with
template toolkit variable renames.

Squashed commit of the following:

commit 2cab669d1fd072600942e1e6fbf3378944255a68
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Thu Jun 2 14:08:40 2011 -0400

    Bug 5929: Fix advanced_notices to use new template-toolkit compatible message names

    Uses 'item_due' and 'advance_notice' for advance notices names; letters do not send otherwise

commit caded04702d5eebd0f63a3b93cdddce28257f092
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 29 12:38:49 2011 +1300

    wr77490 (bug 5929): removed debugging leftover

commit 1944de0de40f937b1d8748500f24a119390db3f0
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Date:   Tue Mar 22 19:05:23 2011 +1300

    wr77490 (bug 5929): use branch email in preference for due notices

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 19:41:26 +12:00
Frère Sébastien Marie
8b3c9e3ef9 Bug 6452: Use placeholders in sql
Signed-off-by: Frre Sbastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 06:56:36 +12:00
Frère Sébastien Marie
4475e9a675 Bug 6452 : Use placeholders in sql but makepayment seems dead code ?
Signed-off-by: Frre Sbastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-04 06:54:57 +12:00
Chris Cormack
b8ccb80bb1 Bug 5918 : Use the default messaging preferences if the user does not select any
Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-02 09:14:38 +12:00
Chris Cormack
2468bab611 Fixing permissions, no need for this file to be executable 2011-06-02 09:05:37 +12:00
Jared Camins-Esakov
5bbfb94f43 Bug 5683 follow-up: calls to ModBiblio can still fail
Because C4::Charset directly manipulates the MARC::Record object, bad data has
to be cleaned in ModBiblio before the call into C4::Charset. The corrupted
records can also break the Zebra index. After this fix has been applied, it
would probably be a good idea to run the misc/maintenance/touch_all_biblios.pl
script to ensure that this problem has been cleared up.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-02 09:04:48 +12:00
Colin Campbell
968a6af37d Bug 6315: Fix depreciated constructions in C4::Serials
Perl 5.14 will issue warnings in cases where it is assumed that
() will magically appear around qw() as the interpreter
will stop fooling itself that they are there
Added the missing () in the couple of cases they were required

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-15 20:42:08 +12:00
conan (aka Fernando Canizo)
c87e872278 Bug 6218: patron gets dot added if no first name
Trivial fix, now it choose surname if firstname is empty and behaves
like before (firstname.surname) if both are provided.

Signed-off-by: Frederic Demians <frederic@tamil.fr>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-14 19:19:08 +12:00
Matthias Meusburger
417c9084b4 Bug 5995 : MT2892: Fix security issue in CAS intranet login
Users could log in intranet using their cardnumber, with superlibrarian
rights.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-14 04:31:59 +12:00
Srdjan Jankovic
8360343fbc Bug 6033 : wr77488 : report selection filter
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-28 11:14:19 +12:00
Jared Camins-Esakov
139f7343f4 Bug 3543: split NLM call numbers in label creator
Split NLM call numbers using the same rules as those used for Library of
Congress call numbers.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-28 09:04:48 +12:00
Colin Campbell
6a56ada2f1 Bug 6236 : When checking for expiry don't try to process 0 dates
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-22 07:35:11 +12:00
Colin Campbell
0d663c7e8a Bug 6237: remove compile time warning
Remove a 'variable in void context' warning from
C4::Auth which shows up as a compile warning in all users of
the module and generates log noise

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-22 07:30:55 +12:00
Chris Cormack
05eb43f5fc Bug 6224 : Revert "3.0.x: ce353e7 bug #3674 allow users creation with disabled password"
This reverts commit 87b792b2b6.
2011-04-21 14:45:37 +12:00
Chris Cormack
b4d6ad26dc Merge branch 'new/enh/bug_5579' into kcmaster
Conflicts:
	C4/Biblio.pm
2011-04-21 11:48:11 +12:00
Chris Cormack
c58c6c219c Bug 6215 : Fixing a bug with virtuallists
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-21 11:39:58 +12:00
ce849240ad bug 5579: tweaks to bulkmarcimport.pl
Fixes bug where a bib record imported by bulkmarcimport.pl
could become unindexable by ensuring that ModBiblioMarc()
is always called by bulkmarcimport.pl to finalize saving the
bib record (as it was initially created by AddBiblio with the
defer_marc_save option).

Also introduces a utility routine, C4::Biblio::_strip_item_fields.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-21 10:05:02 +12:00
0a27e64a5b bug 5579: remove a now-unecessary vestigal variable
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-21 10:05:00 +12:00
7183f12583 bug 5579: add line removed during patch review
Had effect of breaking item record changes when the
CatalogingLog system preference is on.

(Note to people reviewing patches - please do not modify the content
 of patches that you are signing off on unless you are *sure* you
 know *exactly* what you doing.  The process of patch review should
 not be introducing yet more bugs.)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-21 10:04:53 +12:00
36e3bed7b1 Bug 5791 - Robust handling of deleted/non-existent biblios and authority records
Patch reworked for master using Template::Toolkit.

To+

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-20 12:03:59 +12:00
Matthias Meusburger
2650446d26 bug 5579 : Fixes ISBD display
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:15 +12:00
Matthias Meusburger
a3ff0bb5cb bug 5579 : Fixes several exports to embed items
- The following export pages used to embed items when exporting,
    this was no longer the case, so they were fixed :
      Intranet :
        - basket/downloadcart.pl,
        - virtualshelves/downloadshelf.pl
        - catalogue/export.pl
      Opac :
        - opac/opac-downloadcart.pl
        - opac/opac-downloadshelf.pl
        - opac/opac-export.pl

  - Notes :
     - GetMarcBiblio used to embed items data, this was no longer the case,
       so an optional parameter was added to choose if items should be embedded or not.
       This way, previous work on this bug is not broken, and this is a pretty usefull
       feature, imho.
     - An optional parameter has been added to SetUTF8Flag, to be able to use NFD during
       normalization. This was required to make Unicode/UTF-8 export work again.

Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:15 +12:00
faf7d17211 bug 5579: remove unused routines
Remove the following routines which used to
handle embedding item data in the bibliographic record:

C4::Items::_replace_item_field_in_biblio
C4::Items::_add_item_field_to_biblio

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:15 +12:00
d4ccd78335 bug 5579: reduce processing to log item changes
* no need to record full bib MARC when logging
  change to an item record
* IDEA: set up a separate ItemLog syspref

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:14 +12:00
e96315556b bug 5579: new routine to embed items in bib
Adds a new routine, C4::Biblio::EmbedItemsInMarcBiblio, to
embed the items in the bib record when necessary:

* cataloging/additem.pl
* rebuild_zebra.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:34:21 +12:00
20c1ac5c8d bug 5579: correctly signal when to reindex bibs
* when item changes
* when new item is added

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:33:59 +12:00
095f86ee6e bug 5579: fix moving items from bib to another
* Must signal both bibs to be reindexed

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:33:58 +12:00
Henri-Damien LAURENT
3584c4426b Bug 5579: remove items from MARC bib
This is a squash of four patches by Henri-Damien Laurent
starting work on removing the copy of item record information
in the 9XX field of bibliographic records.  The reason
for doing this is primarily to improve performance, in particular,
the expense of having to add/modify the bib record whenever an
item changes.  Now, whenever an item changes, the bib record is
put in the queue to be reindexed; when the bib is indexed, the 9XX
fields are inserted into the version of the bib that Zebra indexes.
Since rebuild_zebra.pl runs in a separate process, the processing of the
bib record will not delay (e.g.) circulation.

As part of upgrading to 3.4, the following batch script should be run:

misc/maintenance/remove_items_from_biblioitems.pl --run

This should be followed by a complete reindexing of the bib records, e.g.,

misc/migration_tools/rebuild_zebra.pl -b -r

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:33:56 +12:00
Chris Cormack
378602e4fa Bug 6205 : Fix for the installer, falling back to english 2011-04-19 22:05:53 +12:00
Colin Campbell
7c09c12e6a Remove redundant variable
The 'first' element in the structure PrepareSerialsData
was only used in the opac template. Remove assignment
as it is now obsolete (and potentially confusing )

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 13:30:44 +12:00
Jared Camins-Esakov
415ea18007 Bug 5859: Allow user to set encoding for import
Rather than having options for MARC21 and UNIMARC in the "Character encoding"
dropdown, the user should be able to select the appropriate character encoding.
The default retains the current behavior, which is to allow the system to guess
which character encoding is in use. However, it should be noticed that this is
almost always wrong for non-UTF8 records with non-ASCII characters. Specifying
a character set is much more reliable if you're not using UTF-8.

Rebased to use Template::Toolkit instead of HTML::Template::Pro.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 13:05:48 +12:00
Ricardo Dias Marques
7457243d4d Lower dependency on Storable to 2.20 in PerlDependencies.pm
This patch lowers the dependency on the "Storable" Perl package
(also known as module/distribution) from version 2.21 to 2.20

This patch created today (14-Apr-2011) does, in PerlDependencies.pm,
the same as a previous patch dated 30-Mar-2010 from Lars Wirzenius
did, in Makefile.PL :

[Koha-patches] [PATCH] Lower dependency on Storable to 2.20.
http://lists.koha-community.org/pipermail/koha-patches/2010-March/011560.html

The reason for this patch is the same that Lars gave for his:

" The Debian squeeze system has only 2.20, and the 2.21 does not seem
 to be required for all tests to pass. Also, checked with
Galen Charlton and Henri-Damien LAURENT (who added the 2.21 dependency)
on IRC that 2.21 did not have anything that was required, compared
to 2.20. "

I believe this patch should be applied to the "master" branch
and should also be "cherry-picked" for the "3.2.x" branch.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-15 10:45:02 +12:00
Chris Cormack
67e3b86181 Fix for Reserves.t allow the tests to run without a logged in user 2011-04-14 15:03:37 +12:00
Chris Cormack
16b917c2f8 Fixing typo in fix for tests 2011-04-13 14:04:07 +12:00
Jared Camins-Esakov
499c694daf Bug 6154: Default sorting by title doesn't work
If you have the default sorting set to title ascending or title descending,
your search results will not automatically be sorted because the syspref uses
title_asc and title_dsc, whereas Search.pm wants title_az and title_za. The same
issue is present when the default sort is on author.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-13 13:57:40 +12:00
Chris Cormack
25d6beb805 When running the tests a user is not logged in so C4::Context->userenv
does not exist, stopping the tests erroring
2011-04-13 11:52:28 +12:00
Chris Cormack
6152b624f7 Merge remote branch 'kc/new/enh/bug_5431' into kcmaster 2011-04-12 08:57:37 +12:00
Chris Cormack
ce1b47ce0b Bug 5431 : Follow up patch fixing ModBranch
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-12 08:55:20 +12:00
Chris Cormack
88f0c4cb45 Bug 6155 : Fixing bug with lists not showing
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 22:42:57 +12:00
Colin Campbell
46488bfc2e Bug 6085: Fix typo in earlier patch
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 20:47:19 +12:00
Chris Cormack
7efaafe132 Bug 6085 : Fixing the utf8 weirdness
I am not very happy with this fix, but it does mean the template are
translatable and we don't get double encoding issues with them anymore

Please test

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 16:01:59 +12:00
Chris Cormack
5a23a45e32 Bug 6085 : utf8 fixed for xslt, and parameters, broken for utf8 included in templates
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 12:58:05 +12:00
Jared Camins-Esakov
e766a92b98 Bug 5917 follow-up: Quiet errors in C4::Templates
There were a few errors about unitialized variables in C4::Templates.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 08:27:38 +12:00
Chris Cormack
82f0fee5c8 Bug 5917 : Fixing a bug with switching languages
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-10 22:58:08 +12:00
Chris Cormack
bacd210c73 Bug 5917 : Updating dependencies 2011-04-10 21:50:35 +12:00
Chris Cormack
d4cd05126d Bug 5917 / Bug 6085 : Fixing not being able to change language 2011-04-10 20:22:55 +12:00
Chris Cormack
77167b3b17 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-10 20:00:04 +12:00
Chris Cormack
f078103e33 Bug 5984 : Allowing the librarians to hide items in the Opac using a system preference
Squashed commit of the following:

commit 72b578928b287ba3b5fa8965e42ff1ccbdf9013a
Author: Matthias Meusburger <matthias.meusburger@biblibre.com>
Date:   Wed Oct 20 11:26:46 2010 +0200

    Bug 5984 : MT4587, Follow-up: Hiding rules are now in a syspref

commit d95329955f976900afdafa82fe0a1699e8e892dc
Author: Matthias Meusburger <matthias.meusburger@biblibre.com>
Date:   Tue Oct 19 15:19:16 2010 +0200

    Bug 5984 : MT4587, Follow-up: Adds yaml config file for custom opac items hiding

commit 6777c1a97700b77095e4e499ca73040bf94271e2
Author: Matthias Meusburger <matthias.meusburger@biblibre.com>
Date:   Mon Oct 18 11:14:03 2010 +0200

    Bug 5984 : MT4587 : Adds yaml config file for custom opac items hiding

Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-10 19:32:06 +12:00
Paul Poulain
7e1077b51b Bug 5961: Filling a basket from the reservoir
creating a form order to import all records from a staged file at once.
All lines of the choosen staged file will be created with the same budget
and item (if applicable depending on AcqCreateItem syspref)

BibLibre bug #4007

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

Bug 5961: follow-up : use matchingrules selected in manage-stage-import instead of FindDuplicate

Now, bulk importing the iso2709 result in adding biblio or connecting to an existing one

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

BZ5961: follow-up, save currency

Cait noticed that currency was not saved properly in the aqorders table.

note a surprise, as the 3.2 had no currency feature and 5961 had been written against 3.2
anyway, this patch fixes the problem

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 21:45:50 +12:00
Stéphane Delaune
1fafaafc9a Bug 5728: adding note and manager_id fields to accountlines
Biblibre bug #1874

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 21:25:18 +12:00
Henri-Damien LAURENT
0c8c7a8db6 Bug 5637 : MT3044 : Fix CSV export when rer are blank characters
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 19:35:21 +12:00
Henri-Damien LAURENT
40b49900c3 Bug 5631 : (MT #2993) add EAN, PUC and Music-Number indexes
This fix add different "music" identifier to zebra indexes, for example it permit search through CDs via EAN.

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 19:32:04 +12:00
Chris Cormack
c1181b780b Merge remote branch 'kc/new/pending_qa/enh/bug_3644' into kcmaster 2011-04-09 19:16:45 +12:00
Katrin Fischer
ac2da44b69 Bug 5431: Separate state field for library addresses
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 12:01:48 +12:00
Katrin Fischer
21727e00f5 Bug 5422: Separate state field for patron's addresses
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 11:52:07 +12:00
Jane Wagner
ac4e83161c Bug 4394 REVISED Allow opaccolorstylesheet syspref to use an external URL
Previous code would only allow for an auxiliary stylesheet on the same server.  This checks for
http in the opaccolorstylesheet syspref.  If it's found, sets a different variable pointing to the
remote server location.  If not found, retains the previous css directory path.

Also modifies the description of opaccolorstylesheet in the installer files to reflect current
usage as an auxiliary stylesheet.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 11:43:09 +12:00
Alex Arnaud
7c08d7c81e Bug #6130 - Letters: Fixing Subject encoding
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 10:35:15 +12:00
Paul Poulain
074bcc1970 Bug 6118 - Title-host missing in Search.pm
in Search.pm, in the list of available indexes, Title-host is missing

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 10:25:43 +12:00
Chris Cormack
1e7c5166aa Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-08 14:29:21 +12:00
Henri-Damien LAURENT
e2fd348f7f Bug 6017 : MT3157 : editing an attribute lead to Error500
Editing an extended attribute in the extended attribute tab would lead to an Error500
This patch adds some checks for values before UPDATE in SQLHelper.pm
And Adds some checks also befaore calling ModMember in members/memberentry

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 14:14:32 +12:00
J. David Bavousett
d29fd92f66 Bug 4340 - patron name search does not handle punctuated names
This patch will enable C4::Members::SearchMember to handle searching for punctuated
names (e.g. the "Jones" in "Smith-Jones" or the "Angelo" in "D'Angelo")

It is possible to add a bunch of LIKE clauses, but that adds to the search time in
a rather dramatic way.  REGEXP, by itself, is also a performance killer, but I found
a suggestion of using a more-general LIKE ANDed with the specific REGEXP, and this
gives excellent performance over other approaches.

Signed-off-by: Guillaume Hatt <guillaume.hatt@enc.sorbonne.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 14:11:11 +12:00
Chris Nighswonger
d31c1603cc Bug 5251 : Enhancement: [3.2] (Resubmission) Adding code to support using gmail as an SMTP server
This patch adds support for using a gmail account as an SMTP server.
It includes a basic HOWTO.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 14:01:15 +12:00
Colin Campbell
d8b362e0f9 Bug 5415 Let calls of SimpleSearch utilize considtent interface
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:57 +12:00
Colin Campbell
5444413a4f Bug 5415 More consistent returns from SimpleSearch
SimpleSearch returns a 3 element array the first pf which is an error
indication. If an error is returned the other elements are
undefined. If error is undef the other elements are defined
This restores the consistency of the interface as it was before
the addition of zebra

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:56 +12:00
Srdjan Jankovic
b390c657b8 Bug 6024 : add "Run report" link on the new report creation success page
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:29:58 +12:00
Jonathan Druart
6de105084e Bug 6099: error in report pagination when GROUP BY
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 12:15:32 +12:00
Chris Cormack
7d63594b81 Merge remote branch 'kc/new/bug_3072' into kcmaster 2011-04-08 11:22:57 +12:00
6e58529bdd Bug 3072: Search for Heading-Main in authorities
Includes Heading-Main in authorities bib1 attribute set.
Also includes Any in authorities bib1 (was still missing).
Also removes temporary fix in AuthoritiesMarc.pm.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Rebased after pushed fix for #5924.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 11:22:02 +12:00
Colin Campbell
c0655aabe4 Bug 6096 Correctly return arrayref from GetAllShelves
Follow on from bug 5529 GetAllShelves was also vaguely stuffing
an arrayref into an array
Some signs of cut and paste (unnecessary @params variable)
Calling code now does not have to shuffle the return about
to get the reference. Also removed a debug warn

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 11:17:04 +12:00
Colin Campbell
0cf2eccfe9 Bug 5529 Absence or Presence of lists not being reliably returned
C4::VirtualShelves::GetRecentShelves contained some rather confused
code The contents of the requested list are returned in an arrayref
which was in its turn being wrapped needlessly in an array
As a result the returned array always consisted of a single element
irrespective of the number of lists.
Made the routine return the arrayref, which can now be tested directly
Unfortunately rather than fixing this we had previously coded around it
assuming it to be a "design" decision. Have amended other calls of
the subroutine resulting in some hopefully less obscure code

Fixed logic error in the results template which displayed new list
within a test for the presence of lists

Removed the offset parameter from the sql in the routine as it was hardcoded
to 0 i.e. the default value

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 10:51:47 +12:00
Alex Arnaud
22dc04e24c Bug #6082 - On aqbudgets.pl bug on the Statistic's combobox
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 10:45:02 +12:00
Paul Poulain
e5ff05857e Bug 6106: add item not respecting framework in acq The PrepareItemrecordDisplay sub builds an item framework for later use in ACQ Some cases were missing : item subfield connected to a plugin, hidden subfield, long size subfield.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 10:34:09 +12:00
Chris Cormack
fe331a0209 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-08 07:12:06 +12:00
Sophie Meynieux
141a52ac30 Bug #6064 Improvement of default value usage in overdue
Change default value in overduerules table for delayn (NULL instead of 0) and fix GetBranchcodesWithOverdueRules function

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 21:33:40 +12:00
Paul Poulain
311e81810a Bug 6062: ordering basketgroups
When you have many basketgroups, you get the oldest one on top. Usually, you
have something to do on recent ones, so it's better to have basket groups
ordered DESC

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 16:49:24 +12:00
Paul Poulain
c9def93286 Bug 5915 : C4::AuthoritiesMarc AddAuthority
Fixing 100$a simple error: Sometimes, language is encoded fre50 and not
frey50.
This patch adds check for that problem

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 16:33:50 +12:00
Julian Maurice
9dc9f73bfe Bug 5923 : Removed link from variable $summary
Variable $summary contained <a> and <b> tag. They have been deleted.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 16:25:22 +12:00
Matthias Meusburger
3a8be8d8e0 Bug 6028 : MT3815: Quickfix for CSV export (9999 rows limitation)
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 15:12:48 +12:00
Chris Cormack
13ad14a754 Bug 6014 : Removing a leftover warn 2011-04-07 13:16:26 +12:00
Henri-Damien LAURENT
99b49e2b1a Bug 6014 : MT3138 Adding some permission management to viewlog
If user can not access reports, then form to search the logs is not displayed.
It also improves the presentation.

C4/Log.pm
- adds the fact that we can enter multiple actions
- fixes the fact that user information was truncated

circ-menu.inc:
Fixing information passed to the viewlog from circ-menu

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 13:14:17 +12:00
Chris Cormack
31c519006e Merge remote branch 'kc/new/bug_5555' into kcmaster 2011-04-06 19:49:55 +12:00
Janusz Kaczmarek
ab7435f964 Bug5555 Corrected search for ISBN / ISSN
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 19:49:18 +12:00
Henri-Damien LAURENT
c19d505abb Bug 5924 : C4::AuthoritiesMarc.pm search enhancement
Heading Main is defined in unimarc record.abs
re enabling that feature

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 19:35:18 +12:00
Frédérick Capovilla
0f4edffc16 Bug 5410 : Adds "do-not-truncate" in the search queries of Heading.pm
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 17:18:21 +12:00
Chris Cormack
5bdfefc7e1 Merge remote branch 'kc/new/bug_6058' into kcmaster 2011-04-06 15:35:28 +12:00
Chris Cormack
e9db636e63 Merge remote branch 'kc/new/bug_5914' into kcmaster 2011-04-06 15:35:11 +12:00
Jared Camins-Esakov
ad206a73f8 Bug 5651: Question marks break searches w/ICU
When a user is doing a simple keyword search, they should not be expected to
deal with the magical behavior of question marks in Zebra. This fix escapes
question marks, and reduces the number of false positives for identifying a
"simple keyword search."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 15:33:58 +12:00
Chris Cormack
706a881b7f Bug 5914 : BuildUnimarchierarchies can go into an infinite loop Squashed commit of the following:
commit 58e18dfa4109fcdde3c71675ff07ed6aae86b258
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date:   Tue May 18 16:54:49 2010 +0200

    Bug 5914 : followup BuildUnimarchierarchies fixing infinite loop

commit bbbcb7fcb0ff36eb8a072d9b0442996e71ebb247
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date:   Tue May 18 13:11:44 2010 +0200

    Bug 5914 : BuildUnimarcHierarchies : Fixing infinite loop

    When referenced authority in 5XX$3 would be the same as the current authid, the script would get into infinite loop

    Conflicts solved: C4/AuthoritiesMarc.pm

commit 3581021997bc8965af807738c47d5fd27f2fd97f
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date:   Wed Apr 7 15:15:59 2010 +0200

    Bug 5914 : BuildUnimarcHierarchies : Fixing infinite loop

    When referenced authority in 5XX$3 would be the same as the current authid, the script would get into infinite loop

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 15:29:38 +12:00
Paul Poulain
ce71043216 BZ6058: uncertain price can't be unchecked
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 15:26:12 +12:00
Chris Cormack
363ea5ce08 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/updatedatabase.pl
2011-04-05 15:39:12 +12:00
Matthias Meusburger
a1a8945c2f Bug 5970: Adds the ability to use a free delivery address for basket
When editing a basket group, user can choose a library for delivery
place, or enter address of his choice in a text field.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Will send a follow-up for missing change in kohastructure.sql
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 15:10:17 +12:00
Srdjan Jankovic
5bcb1529bc wr76595 (bug 4157): Control barcode display with a borrower attribute
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 14:54:50 +12:00
Christophe Croullebois
6a7470341a Bug 5963 : Add the ability to filter budgets using the active column
(MT #4717) Add the capability to have a filter by active budget

the sub GetBudgetHierarchy return aqbudgetperiods.budget_period_active to have acces to a new filtering way,
 more the neworderempty.pl page have a check box "shox all".

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

Bug 5963: Modify GetBudgetsHierarchy to returns all funds

GetBudgetHierarchy now returns all funds, not only those that are part
of an active budget.
Fixed a layout problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 14:38:41 +12:00
Alex Arnaud
3603ae6274 Bug 5947 Suggestions : add date to the search query
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes searching by dates, like 'Suggested on:'
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 11:06:28 +12:00
Christophe Croullebois
5910b59d1d Bug 5962 : Budgets showing when they shouldn't (MT #4717) Bug in Koha 3.2 on acqui-home.pl
In the screen all the budgets with budget_branchcode=NULL were displayed even if the budget_owner_id was not NULL. This patch fixes the bug

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
To test:
1) Add a new fund, leave library empty, owned by yourself
2) Go into the database and change aqbudgets.budget_branchcode to be NULL
3) Check acq home. Before patch the fund will not show up, although it's owned by you.
After patch it will.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 10:11:49 +12:00
Paul Poulain
09e2ee6058 Bug 6043: SQL error when IndependantBranches=ON on suggestion
On suggestion page, when IndependantBranch=ON, the SQL built is wrong:
branchcode is ambiguous

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-05 09:54:19 +12:00
Katrin Fischer
b3efa877e7 Bug 5839: Add index stocknumber on 952$i
This patch adds a new index for stocknumber on field 952$i.

Note: For testing you have to copy over the changed files
from  kohaclone/etc/zebradb/ to your koha-dev/etc/zebradb folders.
Reindex.

To test:
1) Add 952$i to your frameworks
2) Add an item with 952$i
3) Search for your 952$i value in keyword search
4) Search for stocknumber, using stocknumber:<your 952$i value> or inv:<...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-04 20:52:11 +12:00
Chris Cormack
ec41514be6 Bug 5917 : Fixing messaging preferences 2011-04-04 14:15:14 +12:00
Chris Cormack
7e62b5f22a Bug 5917 : Missed one dash
Conflicts:

	koha-tt/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
2011-04-04 13:09:28 +12:00
Chris Cormack
29db29a321 Bug 5917 : Removing spaces, this may not work 2011-04-04 12:56:34 +12:00
Chris Cormack
cd62e6ed02 Bug 5917 : Fixing a problem with login 2011-04-04 12:56:01 +12:00
e1a0b4ab53 bug 4865: added dependency for using memcached for sessions
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-04 10:38:51 +12:00
Chris Cormack
ead56def26 bug 4865: Enable session storage in Memcached
Note: this requires CGI::Session::Driver::memcached to be installed

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-04 10:38:50 +12:00
Chris Cormack
eb4ad6e44e Merge remote branch 'kc/master' into new/enh/bug_5917 2011-04-03 22:35:24 +12:00
Chris Cormack
56d7ab5a19 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-02 19:58:17 +13:00
Colin Campbell
78dfaa1831 Bug 5548: Correct punctuation in patch
Punctuation should be a semi-colon not a comma
It works but is a trap for the unwary in the future

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 19:57:13 +13:00
Chris Cormack
228587f19b Merge remote branch 'magnus/bug3644-normarc' into new/pending_qa/enh/bug_3644 2011-04-02 19:46:30 +13:00
Chris Cormack
75aa5398c5 Merge remote branch 'kc/new/enh/bug_4421' into kcmaster
Conflicts:
	C4/XSLT.pm
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	installer/data/mysql/it-IT/necessari/sysprefs.sql
	installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
	installer/data/mysql/updatedatabase.pl
2011-04-02 07:15:47 +13:00
Jared Camins-Esakov
f1663ada48 Bug 4421: Add alternate holdings display and prefs
This patch adds the ability to specify a field with alternate holdings
information for display when a biblio has no items associated with it.

Two sysprefs are added:
* AlternateHoldingsField specifies what field/subfields contain the alternate
holdings information. When blank, the alternate holdings information is not
displayed. The default is blank, as this is a new feature.
* AlternateHoldingsSeparator specifies the string to be used to separate
multiple subfields in the alternate holdings display. The default is ' '.

Example use case:
A library which does not have a 1-1 relationship between uncontrolled 852 fields
from a legacy system and actual physical items on the shelf wishes to display
holdings information from the 852, but does not want to create item records
which are almost certain to be inaccurate. By enabling the alternate holdings
feature (AlternateHoldingsField = '852abcdhi' and AlternateHoldingsSeparator =
' -- '), the library is able to gradually add item records as they locate the
physical items, without losing the holdings information presently stored in the
uncontrolled 852 fields.

To test:
1) Set AlternateHoldingsField to '852abcdhi'
2) Set AlternateHoldingsSeparator to ' -- '
3) Change the hidden value of subfields 'a', 'b', 'c', 'd', 'h', and/or 'i' of
   field 852 to 0 so that they display
4) Create a record which has data in the 852, but no item record
5) Look at holdings tab, where the data you entered should be displayed

Proof-of-concept initially developed for the American Numismatic Society.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 06:56:02 +13:00
Chris Cormack
937f27e619 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-02 06:44:40 +13:00
Ian Walls
1b402c7422 Bug 5548 Follow up: Confirm Checkout message where it shouldn't be
Fixes the main Hard Due Dates conditional to first check for the existence
of $hardduedate, then the existences of its ISO export, then finally that that
value is not '0000-00-00'

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 06:42:07 +13:00
Paul POULAIN
624ebb6e03 Bug 5625 : adding missing title (needed for lateorders.pl)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 06:28:58 +13:00
Salvador Zaragoza Rubio
689bc19154 Bug 5478 - Automate MARC framework import/export
Module to Import/Export a Framework structure to CSV/Excel-xml/ODS/SQL in Intranet Administration - MARC Frameworks section.
    There are two new links: "Export" to export to a format; and "Import" to import from a file.
    The data exported/imported is the one stored in the MySQL tables marc_tag_structure, marc_subfield_structure.

    Exported works as follows:
    1) CSV: As this format only allows one worksheet, the data from the tables is splitted with a row with #-# cells or with the
    names of the fields of the next MySQL table. Each row has as much cells as fields has the MySQL table. The first row contains the
    field names, the remaining holds the data.
    2) Excel: Excel xml 2003 format. Each MySQL table has its own worksheet in the spreadsheet. Rows and cells data as CSV.
    3) ODS: OpenDocument Spreadsheet compressed format, creates a temporary directory to generate the files needed to create the zip file.
    Each MySQL table has its own worksheet in the spreadsheet. Rows and cells data as CSV.
    4) SQL: Text file, the first row for each table is a delete and the remaining are inserts.

    Importing reads the rows from the spreadsheet/text-file as follows:
    1) CSV: Each row inserts or updates the associated MySQL table for this framework. At the end of the importing for a MySQL table, deletes the rows in the database that don't possess a correspondence with the spreadsheet.
    2) Excel: Imports each worksheet to the associated MySQL table. Works as the CSV for each worksheet.
    3) ODS: Creates a temporary directory to decompress and read the content.xml. This file has the data needed to import.
    Works as the CSV for each worksheet.
    4) Executes the SQL file.
    If the file imported has a different frameworkcode that the framework importing, the framecode is changed along the process.

    The Csv format will be the default.
    It uses perl module Archive::Zip or zip/unzip system command to process ODS files.
    To parse the sql files when importing it uses SQL::Statement or homemade parsing.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 21:17:33 +13:00
ruth@bywatersolutions.com
61e87362c4 Bug 5857: longoverdue.pl needs a quiet mode for batch runs
This patch creates a --quiet flag for longoverdue that will squelch
the summary at the end of the run.  It also silences an unnecessary
warn in C4/Acounts.pm

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 21:13:04 +13:00
Matthias Meusburger
6b2b62eb57 Bug 5952: Shows member relatives in issues lists
Duplicate of '[PATCH] MT3747: Shows member relatives in issueslists' : Subject was wrong

MT3747, Follow-up: Adds siblings issues

MT3747, Follow-up: Shows member relatives in issues lists

 - Now displays patron's and relatives' issues apart

MT3747, Follow-up: Shows member relatives in issues lists

 - Removes renewal in circulation.pl
 - Adds links to moremember.pl

MT3747, Follow-up: Shows member relatives in issues lists

 - Remove unuseful warn

MT3747, Follow-up: Shows member relatives in issues lists

 - Removes renewal in moremember.pl

MT3747, Follow-up: Shows member relatives in issues lists

 - Adds sorting for circulation.pl

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 21:03:14 +13:00
Frédérick Capovilla
21993ab00a Escape the double quotes in authority search queries to prevent errors.
Before this fix, any search with double-quotes would return an error
500.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 20:32:27 +13:00
Katrin Fischer
c0ca9f3413 Bug 5959: Add search link for analytics to serial records
This will work similar to 'Show volumes' links from traced series records and
set records. A link to search for analytics linked to serials.

A new syspref will be added: UseControlNumber.

This syspref will make it possible to determine, if $w and Controlnumber are
used for linking of records in bibliographic records.

If syspref is OFF (default), the search links will not use control numbers
but keywords.
If syspref is ON links will be built using Control-number and rcn index.

NOTE: 773$a is added to index Host-item. For testing on a dev installation:
copy record.abs to your koha-dev folder and reindex!

Rebased against 3.03.00.035 and a small typo fixed by Jared Camins-Esakov.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 20:23:30 +13:00
Katrin Fischer
284cfbc234 Bug 5897: Add new syspref ShowReviewer
This patch adds a new syspref ShowReviewer.

If ON (default) the reviewer/author of an OPAC comment will show.
If OFF the reviewer's name will be hidden.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 20:15:46 +13:00
Chris Cormack
9e3dbeaf39 Fixing FSF address in license statements 2011-04-01 15:55:06 +13:00
Chris Cormack
4990b0d2ee Bug 5578 : Follow up patch fixing FSF addresses 2011-04-01 15:48:19 +13:00
Ian Walls
b2a233f480 Bug 5578: Self checkout by Login enhancement
Enables the library to choose whether to have patrons scan their barcodes for self checkout, or login
with username and password.  Uses 'checkpw' for compatibility with LDAP authentication.

Also introduces a few new system preferences to make Self Checkout more secure and manageable:

  SelfCheckTimeOut:      the number of seconds before the self-checkout login times out for a patron
  AllowSelfCheckReturns: indicate whether or not patrons can return materials via self-checkout
  SelfCheckHelpMessage:  user-configurable HTML to show specific text on the Help page.

Thank you to Marlboro College in Marlboro, VT for sponsoring and testing this development!

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 15:18:40 +13:00
Doug Dearden
6c7f964c27 Bug 5738 Display 856u As Image
Add an option to the OPAC to display the URI that is stored in the 856u field
as an image instead of a text link.  This would be implemented in the OPAC XSLT
style sheets for the Results and Details pages, and would require that the
corresponding OPAC XSLT option be set.

This enhancement is designed to enable the staff to catalog images, then have
them appear on the resulting pages in the OPAC when searching.  Clicking on the
image would open it full size.  If the image option is in use, then the default
link text would be disabled.  Custom text would still appear if entered in the
"URLLinkText" option.

Add system preference "Display856uAsImage" with options of Results page,
Details page, Both Results and Details pages, Neither Results or Details page.

Notes for documentation manager:
There are two system preferences added for this enhancement:
OPACDisplay856uAsImage and Display856uAsImage.  These appear on the OPAC and
Staff Client screens under the System Preferences.

The preference can be set to one of four options:

Both Details and Results pages
Details page only
Neither Details or Results pages
Results page only

In addition to this option being set, the corresponding XSLT option must be
turned on. Also, the corresponding 856q field must have a valid MIME image
extension (e.g., "jpg") or MIME image type (i.e. starting with "image/"), or the
generic indicator "img" entered in the field.

As of 14 March 2011 the UNIMARC xslt display files also require a "0" in the
second indicator location of the 856u field for the links to be activated.  This
is not true for the MARC21 display files.

When all of the requirements are met, an image file will be displayed instead of
the standard link text. Clicking on the image will open it in the same way as
clicking on the link text.

Rebased and three original patches squashed into one on 30 March 2011 by Jared
Camins-Esakov.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Doug Dearden <dearden@sarsf.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 13:38:14 +13:00
Ian Walls
90392c19cc Bug 5990: Lists and Cart show LOC code not Location Authorized value
Lists in the OPAC, and Cart on both sides, show the LOC code for items, rather
than the appropriate Description from Authorised Values.  This is because the
code uses GetItemInfo, which is a very heavy-weight call to only retrieve some
of the desired information.

This patch introduces a new subroutine in C4::Items, GetItemsLocationInfo, which
returns the branch names for both home- and holdingbranches, the location code,
both opac and intranet location descriptions, itemcallnumber and cn_sort. This
should be used instead of GetItemsInfo in any case where the locational
information is all that's required, as it's much more streamlined and efficient.

In the OPAC Lists, this only applies if OPACXSLTResultsDisplay is 'off' (set to
'normal').

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 12:07:46 +13:00
Chris Cormack
849342e3f5 Merge remote branch 'kc/new/enh/bug_5548' into kcmaster 2011-04-01 09:12:58 +13:00
Ian Walls
1d6fa48d19 Bug 5578 Followup: Hard Due Dates break hard-coded default circ rule
If you do not have an applicable circulation rule for a combination of branch,
item type and patron category defined in your Circulation and Fines rules,
the Hard Due Dates development prevents circulation by introducing an error:

Can't call method "output" on an undefined value at /home/magnus/kohahead/C4/Circulation.pm line 2713

This is because the $hardduedate variable is not defined.  Changing the conditional
to check it, rather that it's output, fixes the issue.  That's what this patch does.

Is this the longest commit message for a single line fix?  Maybe.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 09:10:45 +13:00
ruth@bywatersolutions.com
0a64cfba5e Bug 6004/3270: Sending things "home"
This patch addresses two problems:

Bug 6004:

If an item is returned at other than its' home library, and there is a hold for
it--at any library other than the return library--two prompts come up: one
telling the user to send the item home, and the other, to confirm and transfer
for the hold.  Only the latter should be displayed.

Bug 3270:

Cancelling a hold request after transfer initiated orphans item.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-31 21:20:12 +13:00
731b933d51 Fix for Bug 3523 - Menu of existing lists limited to 10
- adding "more" option to the search results dropdown
- offering a scrolling list on the add-to-list popup
- lists add popup shows the full list of all
  the patron's lists, divided into groups of private and
  public lists.

Can be improved by a fix for Bug 5529

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-31 21:08:40 +13:00
Chris Cormack
6350a7d1cb Bug 5917 : Fixing a bug with signedin users 2011-03-31 08:59:27 +13:00
Magnus Enger
edf8ad5d5d Bug 3644 Add support for NORMARC
- XSLT for the OPAC
- Value_builders for lesder, 007 and 008
- Default NORMARC framework
- Reverse MARC logic of some subs, so MARC21 is default (and works for NORMARC)
- Add NORMARC as an option to the syspref marcflavour
- Add record.abs for NORMARC
- Add NORMARC and nb as options to Makefile.PL
- Add etc/zebradb/lang_defs/nb/sort-string-utf.chr
- Copy MARC21slim2OAIDC.xsl to NORMARCslim2OAIDC.xsl

Some things are still missing, e.g.:

- XSLT for Intranet
- More MARC21slim2*.xsl transformations
2011-03-30 10:13:37 +02:00
Chris Cormack
8e00f55216 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
2011-03-30 20:53:45 +13:00
Ian Walls
e57dadf762 Bug 5548: Hard Due Dates Circ Rule
Implements the RFC found at http://wiki.koha-community.org/wiki/Hard_Due_Dates_Circ_Rule_RFC.  See squashed commits
messages below for details of implementation.

Squashed commit of the following:

commit 871b91af00871146eb1216ebf5ce673dda2c5925
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Tue Dec 28 15:09:49 2010 -0500

    Hard Due Dates dev part 3: implementing the due dates in circ

    CalcDateDue now calls GetLoanLength, rather than each invocation running separately one after another.  Therefore, instead of
    the 'loanlength' param, CalcDateDue now takes 'itype', and uses the info to get both the issuelength and the hardduedate info (if it exists)

    Global Due Date no longer populates in the sticky due date field in Circ, since it can't be determined before the item is scanned.  Any specified
    due date still overrides the circulation rules, if allowed.

    Hard Due Dates in the past will return an error message, but can be manually specified if truly desired.

    Also, a small fix to updatedatabase.pl to allow the old data to populate if possible.

commit 14d5505f3c01287a2464a759f0076c1d4b665c49
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 18:28:11 2010 -0500

    HardDueDates dev part 2:  adding admin interface

    Adds columns to Smart Rules page, including calendar for easy date selection.

    Removes globalDueDate and ceilingDueDates from system preferences editors

commit 76e3e3d86a7a54c6ce4253e7f68278b4dc75a0bb
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date:   Mon Dec 27 15:58:05 2010 -0500

    HardDueDates dev part 1: database changes

    Adds two new columns to issuingrules, a hardduedate and a hardduedatecompare.  If globalduedate is set, use that as the universal value
    for all circ rules.  Else, if ceilingduedate is set, use that as the universal value.  Adjust the comparison accordingly (-1 before, 0
    exact, 1 after).  the old system preferences globalDueDate and ceilingDueDate are then removed.

    Rebased onto 3.03.00.032

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:35:45 +13:00
Ian Walls
48ee1dcb3f Bug 5547: Hide Lost Items dev
Adds a Hide Lost Items option to the staff client, as detailed in the enhancement request
at http://wiki.koha-community.org/wiki/Hidelostitems_option_for_the_staff_client_RFC

Minor edits: Whitespace

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:20:05 +13:00
Colin Campbell
88cb47339a Bug 5708 : Get Correct Discount when levying rentalcharge
Branch can be a parameter so it should be included in the rule retrieval
Need to select the most appropriate rule from those returned
(was defaulting to first returned!)
Try to make what's happening a bit less opaque
null fields are returned as undefined not 'NULL' by DBI

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 20:01:37 +13:00
Jared Camins-Esakov
51604b5487 Bug 4393: Scan Indexes results cannot be sorted
Because of the way Scan Indexes works, the results cannot be sorted. Previously
when any sort other than relevance (or in some cases popularity) was used, the
search failed. This patch disables sorting on Scan results. This patch also
fixes the index selection dropdown on the results page, which was not being
populated correctly from the Advanced Search screen.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 19:51:52 +13:00
c83589e0e1 Bug 5687: Add pref StaffAuthorisedValueImages for staff search results
This patch contains the functionality, not the install stuff.

Revised: with input of Ian Walls: populate authorised_value_images only if needed; no changes anymore for template and search.pl.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-30 19:33:09 +13:00