Commit Graph

2300 Commits

Author SHA1 Message Date
Henri-Damien LAURENT cd66ffcbc3 Reverting from MARC::File::XML parser forcing 2009-01-27 12:19:49 +01:00
Joe Atzberger 351d67dd07 Basic cleanup of fixup_cardnumber
Avoid warning on syspref "checkdigit" undefined.
Functionality essentially unchanged.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:48 +01:00
Mason James ca9ba8b803 fix to remove blank newlines from labels
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Marc Chantreux 71ae69780d _set_defaults_for_add easier to read
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Marc Chantreux 5a74b4fa0c more readable version of the init and new sub
Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Nahuel ANGELINETTI e5ac4b52e7 Format marc notes
this patch add a filter to notes, it transform \n in <br />

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Joe Atzberger 79cd91dfe4 Basic reformat of section in Search.pm
In for loops, replace all-inclusive conditional blocks like:
    for (@foo) {
        if (test) {
            block;
        }
    }

with conditional use of "next":
    for (@foo) {
        test or next;
        block;
    }

This reduces the number of unnecessarily nested blocks, and the
overall number of lines.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00
Nahuel ANGELINETTI ea40ff382f (bug #1578) change the shelf COinS support
this change the old COinS support, and now use C4::Biblio::GetCOinSBiblio().

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00
Nahuel ANGELINETTI ada7677996 (bug #2893) Allow loan forcing if a syspref is set
If the syspref 'AllowNotForLoanForcing'(YESNO) is set to YES, the librarian is able to force a loan on an item set as "not for
loan".
If the item is not for loan and the syspref is set to YES, koha will ask to the librarian if he really want to check-out it,
else do nothing.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00
Nahuel ANGELINETTI a4fecfbefa (bug #1578) Add the (quasi)full COinS(Zotero) support
this patch do a lot of things :
 * Add the function GetCOinSBiblio in C4::Biblio, return the COinS value that must be put in a span title
   This will be usefull for OpenURL support.

 * Replace the span in opac-detail, and put the var get from GetCOinSBiblio
 * Fix an <img> tag that wasn't autoclosed
 * Add the COinS in search result
 * Full COinS support of UNIMARC, the MARC21 support should be improved to provide all kind of document types

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00
Nahuel ANGELINETTI 30d2cb06f2 (bug #2904) support of 856$u and 856$z in UNIMARC
This patch change the linktext as the label of the link(in 856$z), and set the url from the 856$u.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
Henri-Damien LAURENT 3cc561543b Prevent multiple warnings per notice filling cron logs.
If a value being substituted in was NULL, then warnings like this
would be emailed to the crontab owner (or MAILTO):

Use of uninitialized value in substitution (s///) at /home/user/kohaclone/C4/Letters.pm line 508.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>

Conflicts:

	C4/Letters.pm
2009-01-27 12:19:45 +01:00
Galen Charlton 9a618896c5 bug 2505: more warnings fixes in C4/Context.pm
* more portable way to determine uname for
  crash messages
* C4::Context->userenv now returns undef instead
  of 0 if no userenv has been set yet; returning
  undef when necessary is almost always better
  than returning a scalar when a hashref is
  normally expected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
stan 6a2a916b75 Enable use warnings;, clean up complainy functions, fix a few tab/space formatting issues.
Refactoring KOHAVERSION to be less crufty, enabling use warnings, change formatting slightly in places.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
Galen Charlton 0ce35bcf21 followup to patch for bug 2900
Previous patch broke date comparison that sets
overdue flag - now that ISO-formatted date
strings are being compared, must use "it"
instead of "<".

"2009-01-02" lt "2009-01-08" is true
"2009-01-02" <  "2009-01-08" is *false*

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
Joe Atzberger 267fe06f0a Bug 2900: fix GetPendingIssues.
GetPendingIssues did several bad things:
~ select * on a 4 table join,
~ including multiple namespace collisions,
~ including large fields marc and marcxml from biblioitems,
~ return ($count, \@array_being_counted).

Not everything is fixed here (see FIXMEs), but the situation is
improved considerably, with bug 2900 resolved.  The "timestamp"
namespace collision in query should be resolved by separate patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
Joe Atzberger 31277c3dcd Bug 2747 for staff interface itemtype display.
Prefer accuracy over graphical icon.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:44 +01:00
Galen Charlton 6976c2ef99 patch followup: restore test in GetMarcItem
Change made to GetMarcItem to quell a warning
changed sense of a test; defined($foo) is *not*
the same as $foo ne ''.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:44 +01:00
Galen Charlton 4d095e145e bug 2505: more warnings fixes to C4/Biblio.pm
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:43 +01:00
Andrew Moore f1f78e5475 Bug 2505: adding warnings to C4/Biblio.pm
I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.

One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.

There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:43 +01:00
Joe Atzberger d7a0dcc55b barcodedecode() did not always return barcode
This patch amends the function to return barcode, in particular when
filter is not defined.  It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.

Non-DB-dependent test script included.  Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T.  This seems mistaken, but is not corrected here
to avoid any surprises.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:42 +01:00
Joe Atzberger (siptest 1503a9099e Allow AddIssue to log SIP transactions distinct from others.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:42 +01:00
Joshua Ferraro 60b91f65c9 Adds the ability to reference itemcallnumber within XSLT
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:42 +01:00
Joe Atzberger abb2e6616b Dates expanding to expose some time (HH:MM:SS) granularity.
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format.  Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV.  ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:40 +01:00
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