Commit Graph

2556 Commits

Author SHA1 Message Date
Henri-Damien LAURENT c3aed6b007 Fixing AddReturn Bad Merge 2009-09-21 14:57:36 +02:00
Galen Charlton af42c93b91 bug 3614 followup
* renamed default_ind_to_space to _default_ind_to_space
  as it is an internal function
* added calls to _default_ind_to_space in other places

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-19 23:47:10 +02:00
Colin Campbell fb3a18f949 bug 3614 Fix incorrect setting of indicator
Pull the code into its own subr so that the dangers of
inaccurate copy & paste are avoided in future

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-19 23:47:10 +02:00
Michael Hafen dbc0161cdc Avoid potentially unnecessary database call in Auth
Auth, after verifying the session/logging in the user, calls to the database
to get the users borrowernumber.  This call is probably unnecessary because
borrowernumber is part of userenv.  Check userenv before going to the database.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-19 23:47:09 +02:00
J. David Bavousett 4328b87841 Handle null-or-empty to Charset::StripNonXmlChars
When rebuild_zebra.pl is run from cron, there is an occasional error
of the form:

Use of uninitialized value $str in substitution (s///) at /home/ebpl/kohaclone/C4/Charset.pm line 304.

This error is occuring when the string that is fed to Charset::StripNonXmlChars
is null or undefined, for some reason.

This fix will handle the null-or-empty condition, and thus suppress the error.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-19 23:47:08 +02:00
Nahuel ANGELINETTI 74b44e4c3a don't die if a bad date is specified 2009-09-19 23:47:07 +02:00
Nahuel ANGELINETTI d20072c7c3 [followup](bug #3370) export function and fix return
this add GetRecordValue in exported functions, and made it to return a ref.
2009-09-19 23:47:06 +02:00
Nahuel ANGELINETTI e63849d137 [followup](bug #3370) fix the "Get" function name
This fix the problem with the Get function in C4::Biblio, the new name is GetRecordValue and located in export_ok.
2009-09-19 23:16:57 +02:00
Nahuel ANGELINETTI b21a5bdadc (bug #3370) add keyword to MARC field mapping
This add the support of keyword => MARC field mapping, ton abstract the relation between human readable fields like subtitle, title, authors, location, ... and MARC fields in each framework.
This will allow to koha developper to be more flexible with each framework and don't care about the MARC flavour, just require some "keywords" to the user.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-19 22:31:34 +02:00
Nahuel ANGELINETTI 2152d95b3c (bug #3550) use GetRecordValue to retrieve subtitle
This patch, is the first use of GetRecordValue, that use the Field mapping.
It retrieve the subtitle in Intranet using it, instead of the use an old function that doesn't work anymore.
This is a way to made koha more generic with each framework.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-19 22:24:41 +02:00
Henri-Damien LAURENT af40164951 followup Amazon.pm bugfix fd4ed72988 2009-09-17 14:52:00 +02:00
Henri-Damien LAURENT fd4ed72988 Bug Fixing Amazon.pm would not compile
missing call of C4::External::Amazon in opac-ISBDdetail.pl
@aws was not defined
2009-09-16 23:22:00 +02:00
Sébastien Hinderer 8702212d16 Get rid of a few warnings in the bulkmarcimport script: C4/Biblio.pm, hunks #1, #2: a warning occurring in NoZebra configurations. C4/Biblio.pm hunk #3: warning occurring in Unimarc MARC flavour. misc/migration_tools/bulkmarcimport.pl hunk #1: warning occurring when no default format is specified on command-line with -m switch.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:47 +02:00
Henri-Damien LAURENT 51adec717f Squashing Merge Fix and followup: renamed _GetCirculationBranch
Merge Fix Followup to 7e2bf9e
2009-09-16 23:19:46 +02:00
Galen Charlton 414f8f91b4 bug 3204: tweaks to AWS request signing
* Add AWSPrivateKey system preference to the
  Enhanced Content tab in the syspref editor
* Now warns to log if attempting to use
  the Amazon API without setting AWSPrivateKey

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 23:19:46 +02:00
Galen Charlton 1d6bc692a6 bug 3204: followup to fix AWS request signing
[1] There were some ersataz spaces in the string
    being signed.
[2] AWS expects a trailing '=' in the Base64 signature

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-16 23:19:46 +02:00
Henri-Damien LAURENT 719280216f bug 3204: implement request signing for Amazon Web Services
After 2009-08-15, Amazon Web Services will expect that
all requests to the Product Advertising API, which is what
Koha uses for retrieving reviews and other enhanced content
from Amazon, include signatures.  This patch and
subsequenct patches implement this functionality.

What this means in practice (assuming the user has elected
to use any enhanced content from Amazon) is that

[1] The user must get a Amazon Secret Access Key.  This can
    be done by logging in to the user's AWS account
    at (e.g.) http://aws.amazon.com/, going to the 'Access Identifiers'
    page, and from there retrieving and/or creating a new Secret
    Access Key.

[2] The contents of the Secret Access Key should then be
    entered into the new AWSPrivateKey system preference.

Once that is done, grabbing reviews and table of contents from Amazon
should work as normal.  If the user doesn't do this before 2009-08-15,
reviews and TOCs will no longer be supplied from Amazon, although there
should be no crashes - the content will simply not show up.

Note that the requirement to sign requests does *NOT* appear to apply
to simply displaying book covers from Amazon.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:46 +02:00
Henri-Damien LAURENT ae24ed1109 [replaceprevious](bug #3562) fix returning document in another branch
there is no transfert alert if you make a return in another branch than the homebranch.
2009-09-16 23:19:45 +02:00
Henri-Damien LAURENT 3e11b4a0b4 Bug Fixing 3542 : searching for authority in cataloguing
There was a problem in the query building
and PERL is quite picky with empty data in arrays so setting empty elements to undef

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2009-09-16 23:19:44 +02:00
Chris Cormack 7bbe9d0ae2 Fixing syntax error in C4/Circulation.pm 2009-09-16 23:19:44 +02:00
Joe Atzberger ea510b04bb Cleanup docs, typos, style etc.
Unused variable removed.  Weirdness with empty position in
assignment list also removed.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2009-09-16 23:19:44 +02:00
Joe Atzberger 771f9a42a9 Fix Maintenance page.
Without this, the mainenance page would not display because of:
Cannot use undefined value as a HASH reference in C4/Auth.pm

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:44 +02:00
Ryan Higgins aae56e21aa Bug 2770 follwup : force AddRenewal obey circControl system preference [revised]
Also prevents infinite-length renewals by returning undef
if passed an invalid date instead of renewing with no due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:43 +02:00
Chris Cormack 129c28d6d1 Fixing bug introduced by a cherry-pick conflict 2009-09-16 23:19:42 +02:00
Joe Atzberger ff7ab2d62a Bug 3056 - replace span hacking for terms in C4::Search
Reimplemented using jquery, added OSS plugin to both interfaces.  This is
another case where having a /common directory used by both OPAC and STAFF
would increase runtime efficiency and cut development time.

Removed unused variables.

I changed the OPAC .term color to match the staff interface, rather than being a
second shade of blue.  The highlight/unhighlight link is currently a bit bolder
than its neighbors, but my styling choices are provisional.  I expect the final
tweaking of CSS to come from another more capable designer, like Owen.

Note this patch may rely on previously submitted "Search.pm minor cleanup" patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Kyle M Hall cce047707f Bugfix 2339 - Place hold button display with AllowOnShelfHolds OFF
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Darrell Ulm 976d31ec6e Bug#: 3230 Penny fine, needs fixed, just a round off. Please
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Galen Charlton 92ead106ac check $debug to print debug info only when wanted
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Galen Charlton 89c4bc43e5 followup to AddReturn patch - fix test
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Joe Atzberger a4b3acc13a 3M SIP2 Extensions groundwork and Patron Info popoulation
This includes some initial work for the 3M SIP2 extensions.
It also better populates the Patron object with methods for
a fuller Patron Information Reponse.  This is positively affect
EnvisionWare software, as used by NEKLS.

This work was sponsored by the Northeast Kansas Library System.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:42 +02:00
Ryan Higgins 34bdb12383 Bug 2770 follwup : force AddRenewal obey circControl system preference [revised]
Also prevents infinite-length renewals by returning undef
if passed an invalid date instead of renewing with no due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:41 +02:00
Joe Atzberger f6d2ffa984 Branch auto-selection in additem
Adding a new item should pre-select the library you are logged in at, where possible.
Use GetBranchesLoop.  This solves indy branches filtering, and sort order problems.
Set default off of ->{selected}, to establish pre-selected branch.
Fix flags check in onlymine sub, so superlibrarian + other flags still gets everything.
Removed defined(@array) check, since perl -wc warns it is deprecated.
Note new FIXME for botched date processing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:41 +02:00
Chris Nighswonger f4786191eb Bug 3390 Enabling ZIP compression in pdf generation to reduce file size
Enabling compression gives a ~26% *reduction* over non-compressed Type 3 font embedding.
ie. 4.5 K/pg (compressed graphic) vs. 17.5 K/pg (uncompressed Type 3 font) vs 111 K/pg
(uncompressed graphic).

It also appears that most other applications that export in pdf use compression by
default. (OO Writer, etc.) So this approach appears justified. One could always add code
to allow the user to select embedding mode and compression.

Also correcting mode parameter value.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:40 +02:00
Joe Atzberger 1e244d83e3 Returns reworking to handle empty GetItemIssue
Code cannot rely on issueinformation being populated.

Note there is room for better efficiency to have AddReturn also provide the
itemnumber (where existing) so that GetItemnumberFromBarcode is not called
at both levels.  Unfortunately there is discrepancy between this idea (for
efficiency) and the stated purpose of the $iteminformation object returned,
since $iteminformation is specifically the info from the issues table and
MUST be empty when the item was not in fact issued.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:40 +02:00
Galen Charlton 6733015247 bug 2893: extend conditions handled by AllowNotForLoanOverride
Prior to this patch, turning AllowNotForLoanOverride on
allowed the circ operator to permit the loan of an
item who's individual not-for-loan flag was set, but did
not allow the loan of an item whose item type's not-for-loan
flag was set.  This patch extends the definition of the
system preference so that both cases are covered.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:39 +02:00
Joe Atzberger 5fc37a04b4 Pull the last OPAC-specific tmpl vars out of gettemplate.
These don't belong every template, only on OPAC:
~ opacstylesheet
~ opaccolorstylesheet
~ opacsmallimage

The latter 2 were already being populated in C4::Auth anyway.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:38 +02:00
Galen Charlton 84fe754654 bug 3263: Staff Search Results Interface Changes
Coding by Rick Welykochy <rick@praxis.com.au>

[1] Three new system preferences to enable particular
bib record views in the staff interface:

viewMARC
viewLabeledMARC
viewISBD

Implements enhancement 2642.

[2] New button in the regular and cataloging search results
   pages in the staff interface to allow the operator to redo
   the search against Z39.50 targets instead of the Koha database.

[3] Added copyright date and edition to cataloging and Z39.50 search results.
    Implements enhancement 2640.

Feature sponsored by MassCat.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Ryan Higgins a6df74d80b bug 3244: Support for multiple PAC interfaces.
Adds three env vars allowing url-specific search limits, and defining
how the limit interacts with 'SearchMyLibraryFirst'.
See http://wiki.koha.org/doku.php?id=en:development:rfcs3.2:rfc32_multiple_opac

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Chris Nighswonger 2d0476d6d9 Bug 2500 Tweaking DDCN Split for Hyphenated Volumn Numbers
Presently 252.051 T147 v.1-2 is split as

252.051
T147
v.1
-2

This patch corrects the algorithm so that it splits as

252.051
T147
v.1-2

It also updates Labels_split_ddcn.t to include this particular case.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Jesse Weaver c1e46fd1cd Small documentation improvement for C4::Service
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Galen Charlton 60447f3a64 fix uninitialized value warnings during COinS generation
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Galen Charlton d1c1150e31 bug 3219: handle variation in Amazon responses
An Amazon ItemLookup response can sometimes have
more than one Item element, where the ones after
the first appear to be cross references to items
that have the same ISBN.  Changed parsing so that
those responses are no longer treated like pseudohashes.

This fixes the following crash:

[error] detail.pl: Pseudo-hashes are deprecated at /catalogue/detail.pl line
213., referer: /cgi-bin/koha/catalogue/detail.pl

Which may lead to a nasty:
[error] Out of memory!, referer: /cgi-bin/koha/catalogue/detail.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Galen Charlton 141d0fad0d bug 3120: tweak splitting of Dewey call number
If a call number prefix contains a hyphen, try not to
split on the hyphen.  For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:

CD
-ROM
787.87
EAS

it should be

CD-ROM
787.87
EAS

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:34 +02:00
Frédéric Demians 2403255d0b Bug 3213 - UNIMARC/MARC21 selection
Modify how XSLT stylesheet are choosen
depending on 'marcflavour' syspref.

DOCUMENTATION: XSLTResultsDisplay and XSLTDetailsDisplay
sysprefs aren't MARC21-only anymore.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:34 +02:00
Chris Cormack 3b02ff1f3a Fix for opac-detail being broken after merging 2009-09-16 23:19:33 +02:00
Henri-Damien LAURENT 305dbbead0 Revert "followup previous patch - remove disused $opacstylesheet"
This reverts commit 59b8fd2383053698996ffd2f6d936d8fcb20ca76.
c4/Output would not compile
2009-09-16 23:19:33 +02:00
Nahuel ANGELINETTI f813c38ee7 (bug #3497) show publication year, or copyrightdate
This change the shelf view in opac, to show publication year, in the column "Year"(that was previously copyrightdate), and is there is no publication year, show copyright date.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:32 +02:00
Nahuel ANGELINETTI 7794cf2eb3 (bug #3432) fix return of lost items
This patch delete some useless code, and fix the problem that if a lost item is returned, the lost flag is not deleted.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:32 +02:00
Nahuel ANGELINETTI 5da38d9ce6 (bug #3409) fix return rules for transfert
This patch add the use of CircControl and HomeOrHoldingBranch for return and transfert rules.
* ItemHomeLibrary goes to item{HomeOrHoldingBranch}
* PatronLibrary goes to the borrower library
* PickupLibrary depends where the items was checked out, and the actual library.

This add a little improvment that does not re-request each time the circcontrol syspref.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:32 +02:00
Henri-Damien LAURENT b450285003 Adding autotruncation
Allow autotruncation to be set on its own
This simply reprocess operands in order to add * at lefthandside
It is a problem with non LTR scripts. But works fine with all the latin scripts

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:31 +02:00