Commit Graph

2544 Commits

Author SHA1 Message Date
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
Nahuel ANGELINETTI 1471d30dfb (bug #3541) show reserved items as not available
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:31 +02:00
Nahuel ANGELINETTI d298b87548 [3.0.x](bug #3242) send email when hold is placed
This add a new letter in database, and each time a new hold is placed, a new mail is enqueued.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:31 +02:00
Jean-André Santoni 4183dd0a11 This little hack makes BuildUnimarcHierarchy able to work with any 2.. field.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:29 +02:00
Colin Campbell f9f78672ea Avoid numeric comparisons with leading zeroes
Numbers in perl with leading zeros are interpreted in octal
Ensure that comparisons are done using string operators
or where appropriate use the MARC::Field method

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:28 +02:00
Henri-Damien LAURENT 47f1932ffc Findgroupreserve update : Factorizing code
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:25 +02:00
Galen Charlton e0f1beb40e bug 3520: fix crash when adding or editing items
Fix the following crash when adding or editing an
item record in the staff interface:

Can't call method "append_fields" on an undefined value at
/usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92.
 at /usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92

This crash appears only if a version of MARC::File::XML
greater than 0.88 is installed, and was triggered by
C4::Biblio::TransformHtmlToXml() failing to create a valid
MARCXML blob, which must include a <record> element.

This patch also fixes the indicator values generated by
TransformHtmlToXml(), setting them to " " instead of
"" when no indicator value is supplied.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:25 +02:00
Galen Charlton 87ebf23ea9 bug 2157: add ability to 'clean' staged record batches
batches, it is now possible to 'clean' a batch by
removing all bib and item records staged in the batch.  This
has the effect of helping to reduce database space used
by old import batches as well as removing staged records
from the cataloging reservoir search.  Note that 'cleaning'
a batch affects only the copies of the records that were staged;
if the batch was committed, cleaning the batch does not
affect any bibs and items that were committed into the catalog.

Also note that once you clean a committed batch of records, it is
impossible to undo the previous commit operation.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:24 +02:00
Garry Collum a5aadae0a4 Bug 3292: Fix to display Branch names instead of branch codes in opac serial's displays.
Fixes display of branch name in opac-full-serial-issues.tmpl and opac-serial-issues.tmpl.  Also enables zebra striping in opac-serial-issues.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:24 +02:00
Henri-Damien LAURENT df024e89d6 _remove_stopwords in C4::Search had some issues
For some reason, it would not really do an exact match on stopwords but would also prune some other part of words

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:24 +02:00
Colin Campbell 4a30bccba9 Stop generation of unnecessary warning messages to log over undef values
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:23 +02:00
Henri-Damien LAURENT 1358afe701 Installer break utf8 for DBD::mysql
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:22 +02:00
Joe Atzberger 9ae23c7b05 Search.pm minor cleanup
Trying to move towards enabling warnings.
Add warn for unknown $query_type.
Use common $dbh.

push @array, ({key1=>value1...}); is the same as
push @array, {key1=>value1...};

if ( scalar(@$arrayref) > 0 ) is the same as
if (scalar @$arrayref)

Lines like:
    my @operators = @$operators if $operators;
are bad because we need @operators to be declared and in scope later,
even if it is undef.  Without $operators, the variable is not in scope.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:22 +02:00