Commit Graph

3462 Commits

Author SHA1 Message Date
Srdjan Jankovic d7aa3a4434 bug_6318: Always give predefined fields drop downs on label layout edit
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit d43aa87d35)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-15 20:21:17 -04:00
Owen Leonard 1bd17707e8 Fix for Bug 6458 - incorrect parsing result in translation processing
Correction for opac-messaging.tt tops tag attribute markup from
being passed to the template directly in favor of using template
logic.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 4324377c55)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-15 20:20:28 -04:00
Colin Campbell 275e5d8727 Bug 6620 Ensure autoflush is set on output filehandles
stdout is by default buffered and a flush is only guaranteed on CR
Sip responses are not CR terminated so we need to ensure autoflush
is switched on  so that the filehandle is flushed after a print
Otherwise this can manifest as self checks running slow or
failing due to timeout (although in the log we see the response)

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f9ccfae400)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-14 14:04:04 -04:00
Robin Sheat aa2284e111 Bug 6129 - [3.4.x] this adds an ISSN to serialssolutions URLs
If a URL is a serialssolutions URLs that doesn't already have an ISSN
parameter, this adds one on the OPAC.

Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Author: Robin Sheat <robin@catalyst.net.nz>

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-13 20:29:28 -04:00
Chris Cormack 17bd8384e2 Bug 6555 : only 10 lists show in the staff client
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e23608a1f9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-09 22:16:23 -04:00
Chris Cormack 26c8351e08 Bug 5524 : Cant delete list from the second page of lists
Includes follow up fixing deleting lists in OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e39de04020)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-02 15:11:54 -04:00
Ulrich Kleiber 2346f0e97a Bug 6765: sip2 unicode checksum
Changes checksum calculation method, as per Dan Scott's fix in openncip.
see http://sourceforge.net/tracker/?func=detail&aid=2925760&group_id=161781&atid=821216

http://bugs.koha-community.org/show_bug.cgi?id=6765
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 8a7c916766)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-02 15:09:29 -04:00
Ward van Wanrooij 21c4438cce Bug 6723 : import-framework-crlf
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
(cherry picked from commit 07838bfcb1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-02 14:54:38 -04:00
Salvador Zaragoza Rubio 09010c2038 Bug 6727 - Change on exporting and importing csv to deal with spurious CR/LF
Function _export_table_csv modified to remove CR/LF in the data
from the database to built a correct csv file.

Function _import_table_csv modified to deal with CR/LF in the data
field. When a line is found with an unproper end (a data field has not
end quote), it's concatenated to a temporary buffer until the next
line ends ok and then it's proccessed.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 6b69260fbd)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-02 14:43:10 -04:00
Owen Leonard bfed019c20 Fix for Bug 6754, Improve breadcrumbs on lists pages
Breadcrumb navigation on the lists pages should give the user links back to the
category of list they're viewing, public or private.

Patch changes this:

Lists -> Contents of (Your list)

To this:

Lists -> Your lists -> Contents of (Your list)

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 02f1058a80)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-09-02 14:40:32 -04:00
Frédéric Demians 267f32d701 Bug 6458 Template Toolkit files test case
This test validate Template Toolkit (TT) Koha files.

For the time being an unique validation is done: Test if TT files
contain TT directive within HTML tag. For example:

  <li[% IF

This kind of constuction MUST be avoided because it break Koha
translation process.

This patch transform also translation specific modules into C4 modules
in order to be able to use them in test case:

  C4::TTPaser
  C4::TmplToken
  C4::TmplTokenType

This patch is a Perl adaptation of a Haskell script from Frère Sébastien
Marie.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on testing:
- translate install de-DE - worked ok
- translate update de-DE > translate install de-DE - worked ok
- running the test xt/tt_valid.t - worked ok and pointed out lots of problems.
Found no problems.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit a41100a445)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-18 06:53:48 -04:00
Brice Sanchez af853ad07c Bug 5713 :debug calculation when fines are reversed then re-payed
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

I could not reproduce the calculation bug, but after
applying this patch multiple pay/reverse cycles only
are still only  2 lines in accountlines, which makes the
display a lot less confusing.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 5b945d8c41)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-16 22:22:29 -04:00
Ian Walls f1894dada9 Bugs 6634: manager_id not recorded for payments and rental charges
Manager_id, the borrowernumber of the staff person doing the action, was not recorded
for payments, rental charges, or rental charges on renewals.  This patch implements that.

This patch also adds the recording of itemnumber in a payment, by taking the itemnumber of
the account that it's paying off.  This addresses bug 2696, though it does not make any
change to the display logic of the Payments line in the staff client.

To test:
1.  Check out an item with an issuing charge
2.  Renew the item
3.  Pay one of the rental charges on the item
4.  Verify in koha.accountlines that each of the three above operations recorded your borrowernumber
in accountlines.manager_id

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 18c491542b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-15 09:05:37 -04:00
Colin Campbell 1f3ae4aa42 Bug 6181: Remove CGI Scolling lists from C4::Budgets
As noted on bug 766 more cases of usage of
CGI::scrolling_list were imported into C4::Budgets
Even if we were not trying to remove usage of this
the C4 modules are not the place to generate markup
Most of these routines are noise as they are not used in
any current code but cause confusion and increase
maintenance overhead. They are removed

The sort dropboxes on order create are the only
references in current templates to these routines
they have been replaced by a select list generated
by the markup.
They can probably be removed too but their existence
although the option that causes them to be displayed
seems unlikely to be set. I've left them pending
resolution of some of the inconsistencies and
confusions surrounding Budgts

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 1a03a8a38e)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-14 13:46:10 -04:00
Marcel de Rooy 7aeccb7ec2 6290: Fix warning on XSLT.pm
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
(cherry picked from commit 04e97b57ff)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-10 21:51:03 -04:00
Colin Campbell 06a38274ca Bug 6280 : Don't generate invalid SQL in GetPendingIssues
Change to parameter list in GetPendingIssues made it
callable by an empty list resulting in invalid sql being
sent to server. As this was occuring on most issues error log
was filling up. Put safeguard in the routine
Also don't bother calling when you have no need

Some of the processing was needlessly obscure

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit c435c8c7d1)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-10 21:50:45 -04:00
Jane Wagner 36523ea36a Bug 6034 - Shelving cart feature can wipe permanent shelving location in certain circumstances
Bugfix for problems when shelving cart used without In Processing settings

To test, with InProcessingToShelvingCart off, NewItemsDefaultLocation blank,
and ReturnToShelvingCart on, create a new item.  Check the contents of the
location and permanent_location fields in its item record -- the same value
should be in both.  Then run the item through checkin, and look at those fields
again.  The location field should now be set to CART while permanent_location
should still have the original value.  After the cart_to_shelf cron job runs
with the proper timing, check the item record again.  Both location and
permanent_location should again be identical.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 2bb9904ab3)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-10 17:48:28 -04:00
Jean-André Santoni 8a6278251e Bug 5639 (MT #3605) Fix escaping in ILSDI
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 2c88e1e0f8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-10 17:37:48 -04:00
Robin Sheat cb0862db67 Bug 5072 - prevent creating new orders if there are no valid budgets
On the basket editing screen, the links to add orders to a basket are
hidden unless a valid fund is available.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 4833fd8399)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-03 22:44:06 -04:00
Frédérick Capovilla 18160fa5e2 Bug 5737: Modified the merge subroutine in AuthoritiesMarc.pm so it won't destroy the connection to the biblioserver.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
(cherry picked from commit 94700d65c0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-03 18:29:55 -04:00
Stéphane Delaune d5a8cb1b42 Bug 6135: insert fields ordered in C4::biblio:ModBiblioMarc
Fixing order subfields for biblionumber and biblioitemnumber

BibLibre MT5951

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 97964bc3e9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-01 12:39:18 -04:00
Colin Campbell d17fc11874 Bug 6311 check_inst_id was being passed non-existent value
Due to a typo in the hash key check_inst_id in the
handle_end_patron_session was always logging an error
as the actual field contents were not being checked
unlike in other messages

Signed-off-by: Frederic Demains <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e793b0dda6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-01 12:39:06 -04:00
Katrin Fischer e0feb1c19e Bug 4433: Small display problem for topical subjects
This removes the subfield codes shown for topical subject authorities only.

To test:
- Add different authority records and at least one for a topical subject.
- Use search in intranet and opac (turn on opacauthorities) to serch for your subjects.
- All headings will show without the subfield codes (at least $a in front), except the
topical subject.

This patch removes the subfield codes for the topical headings.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised in opac and staff. (July 18, 2011)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 4d81858ec6)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-01 12:38:18 -04:00
Ian Walls 57ebea8aaa Bug 6521 Follow up: previous patch breaks autoMemberNum functionality
The previous patch broke the autoMemberNum feature by adding a line to fixup_cardnumber
that returned 'undef' for cardnumber in all usages of the subroutine (limited to members/memberentry.pl
and tools/import_borrowers.pl.  This prevented the automatic number from being calculated in all cases.

This patch removes the offending line.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit d119fbd91c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-08-01 12:34:07 -04:00
Ian Walls d5c1929ed1 Bug 6614: Remove newlines from order notes when exporting to CSV
Newline is not a valid character to Text::CSV's combine() subroutine.  If an order
contained a note with a newline in it, that line would come out as a blank entry in
the exported CSV.  This patch strips such characters, globally.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 68f99cdf98)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-26 19:51:49 -04:00
Ricardo Dias Marques a5d777bd3f Bug 6503 - Variable $sth is declared 3 times (with keyword "my") in "makepayment" sub of "Accounts.pm"
In the code available today (14-Jun-2011), in Koha git's "master" branch,
the file "Accounts.pm" (in the "C4" directory) has the variable "$sth"
declared 3 times in the "makepayment" sub. This causes the following
warnings to appear when running "make test" in Koha installation, for
several tests:
t/Heading.t ......................... "my" variable $sth masks earlier declaration
in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope at
kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.
[...]
t/ILSDI_Services.t .................. "my" variable $sth masks earlier declaration
in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope
at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.
[...etc...]

Therefore, I'm removing the "my" keyword from the declarations of "$sth"
in lines 172 and 188 of "Accounts.pm".

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 71d22ab827)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-25 22:06:35 -04:00
Janusz Kaczmarek d397e16eb3 Bug 6480 - Koha produces a lot of apache logs for UNIMARC
For Koha with UNIMARC a lot of entries in apache log lines are produced.

In the patch, corrections to the GetCOinSBiblio function has been introduces,
in the UNIMARC section: (i.e. || '' at the end of lines that can create this
problem) -- analogous as it is in the MARC21 section.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f16abec68a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-25 22:06:03 -04:00
Chris Cormack 5d627fdc8f Fixing missing padding on module version
(cherry picked from commit 80ba84159d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-22 16:31:02 -04:00
Ian Walls a15becb9d1 Bug 6613: CSV basket export columns misaligned
Removes 'line' heading, since it does not correspond to any existing field name, and it pushes the fields
over by one ('ordernumber' is used to denote the ordernumber).

This patch also optimizes the GetBasketAsCSV subroutine a bit; it removes an unnecessary call to GetBiblioData,
since the order information retrieved from GetOrders already contains every field in koha.biblio and koha.biblioitems

This patch also removes the explicit sort done by publishercode, since the information returned by GetOrders is
already ORDER BY'ed, first by publishercode, then by title (there was a FIXME note in GetBasketAsCSV to do this, but
it's already done, so... :) )

To Test:
1.  Create a basket with at least three orders:  one from one publishercode, and two from another
2.  Be sure to leave out any "\n" in your Order Notes, lest you fall prey to bug 6614!
3.  Export the basket
4.  You should see the orders sorted first by publishercode, then by title
5.  Columns should line up correct all the way through

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit c414c11d64)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-22 16:30:42 -04:00
Dobrica Pavlinusic ec92d9407e Bug 4994 - Net::LDAP returns lowercase names
This requires us to specify all LDAP mappings in koha-conf.xml in lowercase,
instead of original case used withing LDAP.

Compare readability of

<userid      is="hrEduPersonUniqueID"  ></userid>

(which doesn't work) with required (and non-intuitive)

<userid      is="hredupersonuniqueid"  ></userid>

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
(cherry picked from commit b79c4c88a9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-14 21:11:13 -04:00
conan (aka Fernando L. Canizo) 3738e320a7 Bug 3674: reimplementation
05eb43f5fc reverted a previous
implementation of 3674.

3674 was encoding the password field when it was meant to be disabled
(password='!'), and then, in Auth.pm we were trying to compare an
encoded '!' with '!', which will never succeed.

This gets sure we encode only provided passwords and also includes an
auto generated login.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit c5b1c39b80)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-10 14:36:05 -04:00
Owen Leonard a6c7d6e7a7 Fix for Bug 3397 - Deleting item record leaves a hole in patron's reading history
Excluding entries in old_issues which have a NULL itemnumber

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 9047bd2ddf)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-10 14:35:30 -04:00
Janusz Kaczmarek 1192f869b4 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>
(cherry picked from commit e653e8ce0b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-10 14:31:54 -04:00
Chris Nighswonger 1ea00e655f 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>
(cherry picked from commit ae48ebbcaa)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-10 14:31:23 -04:00
Magnus Enger 55761c4e9b 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>
(cherry picked from commit 610457ea41)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-07-10 14:30:38 -04:00
Robin Sheat 89538c1943 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>
(cherry picked from commit 785af7310d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-27 07:32:01 -04:00
Ian Walls d1af75ae4a 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>
(cherry picked from commit 26965cf1df)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-27 07:31:40 -04:00
Jeremy Crabtree 6ececf96cd 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>
(cherry picked from commit 7bb178e30b)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-19 16:05:16 -04:00
Dobrica Pavlinusic 7e052ff23b 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>
(cherry picked from commit 322a5ef481)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-19 16:04:41 -04:00
Colin Campbell 069dff58e8 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>
(cherry picked from commit 2ab00242d0)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-19 16:03:48 -04:00
Galen Charlton ee02c805fc 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>
(cherry picked from commit d2f49e1976)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:59:37 -04:00
Fridolyn SOMERS f6b7775a51 BUG4319 waiting items cannot be reserved
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 98f2780227)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:58:52 -04:00
Frédérick Capovilla c1f561e27c 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>
(cherry picked from commit ecda6f7305)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:58:25 -04:00
Owen Leonard 33f2b99d2e 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>
(cherry picked from commit a13194f2cd)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:57:11 -04:00
Srdjan Janković 3423d19d99 bug_6433: exception handling
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
(cherry picked from commit 5829cef6d8)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:56:45 -04:00
Magnus Enger 669f73bc08 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>
(cherry picked from commit a54716e50d)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:56:02 -04:00
Chris Nighswonger f024b7f5a7 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>
(cherry picked from commit 939d0ab639)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:46:15 -04:00
Ian Walls e0c6361457 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>
(cherry picked from commit 5ae3a3aa4f)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-13 20:44:59 -04:00
Frère Sébastien Marie b82aaa1610 Bug 6452: Use placeholders in sql
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 8b3c9e3ef9)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-03 15:15:38 -04:00
Frère Sébastien Marie 0f61b0e8d5 Bug 6452 : Use placeholders in sql but makepayment seems dead code ?
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 4475e9a675)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
2011-06-03 15:15:24 -04:00