Commit Graph

2276 Commits

Author SHA1 Message Date
Nahuel ANGELINETTI d647bc8fea (bug #2862) improve sql reports
Clear all non-alphanum chars at the end of an sql query.
Use ESCAPE=HTML to escape double quotes in csv export
2008-12-12 14:53:20 +01:00
Nahuel Angelinetti 248bc934f8 (bug #2856) Activate the duplicate patrons detection and check birthdate only if one is set
This patch activate the check of unique member, it was checked but not shown, and the member was added even if a duplicate was
detected.
It improve the duplicate detection, to check the birthdate only if it was specified in the form.
And fix an url of "Yes" link(if the borrower added IS the duplicate detected).
2008-12-12 14:53:18 +01:00
Henri-Damien LAURENT 1b9542fbeb bug #2852 encoding problems with custom summaries
decoding data in order to correctly display.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:29:16 +01:00
Frederic Demians 9547adb7c3 Force MARC::File::XML to use LibXML Parser
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:29:03 +01:00
Henri-Damien LAURENT 0bab475c05 Bug Fix : 2844
Some old mysql versions were not happy with the proposed SQL syntax.
Now it is more Mysql version safe.
Adding table names on JOIN

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:27 +01:00
Galen Charlton 196dc5bbee fix POD error introduced in last patch
Run prove xt/author/podcorrectness.t to verify
that POD is syntactically correct.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:22 +01:00
Danny Bouman 4b7fb10eef bug 2817: Added support to pull Amazon information based on UPC, EAN, and 13-digit ISBN
By adding support for UPC,EAN and 13-digit ISBN we are able to pull much more content from Amazon, especially on most music and dvd content which
does not have an ISBN.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:15 +01:00
Nahuel Angelinetti 2e9b4536cc bug #2757: change the opac login generation
This patch change the method used to generate a new login for a user when his informations are modified(memberentry.pl).

Before the login are generated with the first letter of lastname and the 9 first letter of the surname, and do not verify the
login already exist).
Now the login will be lastname.surnameX, where X is an incremented digit if the login already exists.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:09 +01:00
Galen Charlton 33888b26b5 bug 2758: don't confirm checkout if fine balance is 0
Fixes problem where if the IssuingInProcess preference is ON,
the operator is always required to confirm a checkout if
the patron has had any fine transactions at all, even if
the patron's balance is 0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:04 +01:00
Galen Charlton 9a06b11201 fix permissions error introduced by previous patch
Modules in C4 should not be executable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:25:55 +01:00
Henri-Damien LAURENT 887d4637da [bug #2750] Cannot return to another branch if the independantbranch option is set as ON
The code was modified to change the holding branch ONLY if the return to
the right branch is done. If you set IndependantBranch to on, you must
return the document to the HomeBranch.
And verify the return is done before show the message that allow to
transfert the document to another branch.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:11:52 +01:00
Henri-Damien LAURENT 620ead4445 Allow renewal limits to be overridden
Originally by Jesse Weaver <jesse.weaver@liblime.com>

This patch creates a new system preference, AllowRenewalLimitOverride,
that, if YES, allows the renewal limit to be manually overridden. It
updates C4::Circulation and reserve/renewscript.pl to obey this.

Adapted for 3.0 : Henri-Damien LAURENT
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:11:42 +01:00
Joe Atzberger (siptest 7822223b72 Bugs 2541 and 2587 - AddIssue must return date object as intended.
SIP actually relied on the AddIssue return that was not reliable.
AddRenew also updated to return C4::Dates object for datedue.

Please note, any running SIPServer will have to be restarted
*immediately* after applying this patch, because although Koha
C4 behaves as normal, the SIP server runs as a Net::Server with
components cached.  Changes will not be applied until SIPServer
restarts, and so checkout actions may fail until then.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:11:30 +01:00
Henri-Damien LAURENT 91d174462f [REPLACE previous] Removing map calls in void context
Thanks Joe.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:11:21 +01:00
Allen Reinmeyer af7c33b328 Bug #2531 Cannot delete private shelf
Added logic to create a list of private lists to check on deletion.  Multiple pages have the ability to delete lists, both private and public.  Default option of retrieving a user's lists is retrieving the public ones.  Now private lists of the owner are retrieved as well and checked upon deletion request.  This allows any method of deletion to delete the correct list without examining the myriad of options currently used to indicate display of privateshelves and expect all pages to know whether a shelf number comes from a private or public list.  Since deletion occurs based on shelf number and the virtualshelves table has a primary key on shelf number, this will not cause unwanted deletion of shelves.

UPDATE:  added logic for conditional creation of shelves.  Also note change in staff side as deletions worked except for viewing a populated shelf, then deleting.  The confirm message showed, but the display was of public shelves, not private.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:10:23 +01:00
Henri-Damien LAURENT 25ea703e30 problem saving authority with ? and other special characters [resend]
Filtering those signs in order not to have them interpreted.
Removing some warns

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:10:04 +01:00
Michael Hafen 29cfced581 Use biblioitems.itemtype as a default for items.itype
This correct the html select default in additem.pl, and enforces use of
biblioitems.itemtype as the default in Items::AddItem.  The code in
Items is to catch items added through MARC record staging.

Thanks to Joe Atzberger for suggestion.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:09:47 +01:00
Henri-Damien LAURENT 1f2232bb68 Bug Fix : 2494
Adds some rewriting
bug fix for merging
AddAuthority had some problem with updating existing data.
ModAuthority adds a new Syspref called MergeAuthoritiesOnUpdate which is used to launch or disable biblios update when updating an authority

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:09:04 +01:00
Henri-Damien LAURENT 48d5b8dc01 Merging authorities caused an encoding problem in biblios
MARC::File::USMARC::decode is not aware of encoding as MARC::File::XML is
So it caused a problem when decoding information and updating biblios.
Now uses MARC::File::XML
Encoding is OK

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:08:54 +01:00
Henri-Damien LAURENT ad109791b9 Adding some Error proof on GetAuthority
return undef if there is a problem

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:08:08 +01:00
Henri-Damien LAURENT 3747a599f9 Bug Fix : Adding Some error proofs to HaveSubscriptionExpired
Date::Calc::CalcDays was throwing error 500 when one serial had an undefined date.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:07:50 +01:00
Henri-Damien LAURENT 90143bd46b Using Warns would cause problems with NoZebra
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:07:30 +01:00
Henri-Damien LAURENT 57f53d05d5 Adding some fixing for NoZebra
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:07:21 +01:00
Henri-Damien LAURENT 8cd4d221d8 Bug Fixing : searching on mainmainentry was disabled
Adding Heading-Main as new index code in order to search only on Heading-main when $a selected.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:07:03 +01:00
Henri-Damien LAURENT 1da977684c Restoring startsby search on authorities.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 18:06:29 +01:00
Henri-Damien LAURENT 8d29c78cbb Bug Fix : 2494
Adds some rewriting
bug fix for merging
AddAuthority had some problem with updating existing data.
ModAuthority adds a new Syspref called MergeAuthoritiesOnUpdate which is used to launch or disable biblios update when updating an authority

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-11-24 17:55:03 +01:00
Henri-Damien LAURENT fd59d25aad bug fix : 2805
deleting die on lack of user/password in config file.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-19 05:35:26 +01:00
Galen Charlton 7c1bc8abc4 fix POD error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 17:51:11 +01:00
Andrew Moore dc73ef953b Bug 2775: adding method to clean syspref cache in C4::Context
C4::Installer provides a way to update the kohaversion syspref. Now that
C4::Context caches syspref values, any updated value through C4::Installer
is not being seen.

This patch adds a method to C4::Context to allow you to clean that
cache. Then, it calls that method when the kohaversion syspref is changed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 17:50:50 +01:00
Frederic Demians 76245635b8 Improve C4::Charset::MarcToUTF8Record performance
A script like bulkmarkimport.pl spends most of the time
in C4::Charset::MarcToUTF8Record function, and
specifically in C4::Charset::char_decode5426
just initializing a hash. This patch moves this
hash outside function to avoid its initializing
each time the functon is called.

A test on a specific conversion script shows me
that performances were improved from 23s to 8s.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 17:11:09 +01:00
Clay Fouts 095b5b6de1 Database connectivity cleanups
This patch employs process-local caching of systempreferences and
eliminates the "select 1" execution every time dbh() is called.
DBI::ping() is used instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 17:10:58 +01:00
Joe Atzberger afb5166070 Squash warnings by checking if $type is defined before comparing it.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:53:23 +01:00
Joe Atzberger (siptest 028b15253a followup - make barcode_to_borrowernumber an internal function
Set this function apart with _ since it is not OO like the rest.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:14:25 +01:00
Clay Fouts 727cbd2241 bug 2729: redundant call to C4::Biblio::get_biblio_authorised_values
Removes redundant and expensive call to C4:Biblio:get_biblio_authorised_values

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:14:19 +01:00
Galen Charlton 8cbffd719b followup to Calendar overhaul
correct an errant "SELECT FROM" that slipped in

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:11:40 +01:00
Joe Atzberger ae9a0c8f5f Begin Calendar overhaul, turn on warnings.
Reuse SQL with placeholders where possible.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:11:37 +01:00
Jesse Weaver b69e271424 fix for bug 2543: report output by tabulation a bit too literal
This repurposes the Reports module for general reports, and moves its functionality to a different module, Reports::Guided. It also updates all of the reports that can export to correctly treat the 'tabulation' value of the 'delimiter' syspref.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:11:26 +01:00
Michael Hafen e41cf34933 Adding a few columns to members/readingrec.pl
Add barcode and issues.renewals to members/readingrec.pl
Had to change the query in C4/Members, items.renewals was squashing
issues.renewals.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:51:16 +01:00
Michael Hafen 2892f6e69b bugfix: Sort previous borrowers descending in Items.pm for moredetail.pl
The list of previous borrowers on moredetail.pl shows the three oldest
rather than the three most recent as I expected.  This changes the sql
to order descending so we get the three most recent.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:50:48 +01:00
Michael Hafen c8f2092ebe Don't pull all of biblioitems in GetItemsInfo
Pulling marc and marcxml for some 1200 copies takes a lot of RAM.  Lets
not do that.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:49:57 +01:00
Galen Charlton a7beaebee2 followup - make barcode_to_borrowernumber() work as named
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:47:47 +01:00
Henri-Damien LAURENT 75ff7c6ade SIP Holds processing on checkout
Allow valid comparison of hold_queue to current user barcode and
permit checkout if the current user is at the front of the queue.
Effectively, this allows a user to checkout a book he has held.
Here are the example checkout (11) and checkout response (12)
statements in a SIP telnet session, showing failure (120) previously
and success (121) after patch application.
Before:
11YN20060329    203000                  AOCPL|AA1|AB502326000820|ACterm1
120NUN20081009    140222AOCPL|AA1|AB502326000820|AJKidnapped :|AH|AF2008-10-09 : Koha Admin (1)|BLY|
After:
11YN20060329    203000                  AOCPL|AA1|AB502326000820|ACterm1
121NNY20081009    150204AOCPL|AA1|AB502326000820|AJKidnapped :|AH2008-10-10|AFItem was reserved for you.|

This patch also resolves security/privacy issues related to the display
of "needsconfirmation" values that identify, for example, the user
currently issued an item, or with a hold on the item.  These messages
should not be passed to an end-user interface.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:47:05 +01:00
Joe Atzberger (siptest 0eaf2ff2ab Fully qualify function call.
This is a pre-requisite to continued SIP processing, dealing with some
arcana related to recursive dependencies and UNIVERSAL.  The reason this
is separate from other SIP patches is that it is expected patched in other
submissions already.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:42:30 +01:00
Ryan Higgins fa8cc95574 Bug 2555 : label batch_id not properly incremented after batch num 10.
This is a stop-gap fix intended for 3.0 maintenance release.
3.2 should include a label_batches table which will allow named
batches to be associated with a template & layout, and fix the
column definition of batch_id here to be an auto_incr int.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:42:09 +01:00
Michael Hafen 9f0cc47e1a bug: query squashes issues.timestamp which circulation.pl needs to sort todaysissues
Little change to the query so we get the right timestamp to sort on.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:40:24 +01:00
Michael Hafen f5d9c9d6bb bug: chargelostitem() didn't unset onloan on the item record.
I don't think this is left set intentionally.

If an item is set lost and it's on loan it's marked returned, but it
wasn't set as not on loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:40:19 +01:00
Joe Atzberger f2c1fc5793 Revising the stub for ILS/Transaction/FeePayment.pm
Obviously more implementation is needed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:29:18 +01:00
Henri-Damien LAURENT 3063d08e51 Bug Fixing : 2581 Problem With HomeBranchOrHoldingBranch (count items management)
Using $item->{$hbranch} rather than $item->{homebranch}

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 11:23:37 +01:00
Michael Hafen 74d7ce8ce6 bugfix: need to return something if an itemtype doesn't have an image
I noticed that on the search pages if an itemtype doesn't have an image it's information doesn't make it out the the template.  I don't understand why, but this fixes it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-04 19:16:49 +01:00
Galen Charlton 492ff3a3c8 bug 2582 [1/2]: don't set issuedate during renewal
Changed so that issues.issuedate is never modified
during a renewal, since that column records the original
date of the loan.  Changed the name and interpretation
of the $issuedate parameter of AddRenewal() to
$lastreneweddate, allowing (e.g.) offline circulation
to set the date of the renewal without changing the
issue date.

As a result of the original bug, issues.issuedate can be
set to NULL for loans that were renewed via the OPAC,
self checkout, or the staff interface when explicitly
renewing a loan.  Loans that were renewed by checking
the item out to the same patron will have the issue date
changed to the date of the last renewal.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-04 19:15:54 +01:00