Commit graph

2769 commits

Author SHA1 Message Date
Michael Hafen
2ace8cb33d bugfix invalid comparison to ceilingDueDate in CalcDateDue()
The comparison to check the ceilingDueDate is done in the syspref format,
which isn't a good comparison.  This changes to code so the comparison is done
using iso format.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-15 09:39:04 -04:00
678262db3d 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-08-13 09:29:57 -04:00
b8a87ca256 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-08-13 09:29:56 -04:00
Henri-Damien LAURENT
54f7ca4d3b 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>
2009-08-13 09:29:56 -04:00
4ecaa1f9bd future hold request followup 2 - fix queries
Clarify when it is necessary to add a
'reservedate <= CURRENT_DATE()' clause.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-11 19:23:40 -04:00
Michael Hafen
74a4f29236 Allow the reserve date to be set on holds
This adds to the interface and code the ability to set the reserve date when
requesting a hold.

Resubmit.  Sorry, I formatted it from the wrong branch.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-11 18:02:26 -04:00
7f7dfa0a11 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>
2009-08-11 10:51:03 -04:00
ae5b76c89b 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>
2009-08-10 20:34:55 -04:00
Kyle M Hall
f41971eadf Reverse Payment - Allows any payment to be 'undone' while retaining a record of said payment. Useful for accidental double-payments.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-09 22:23:33 -04:00
Garry Collum
3c27773a41 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>
2009-08-09 22:18:29 -04:00
Henri-Damien LAURENT
7006c555ac _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>
2009-08-09 15:28:17 -04:00
Joe Atzberger
e18de9d605 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>
2009-08-09 13:23:16 -04:00
Joe Atzberger
41d3e534d2 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>
2009-08-09 13:08:43 -04:00
Nahuel ANGELINETTI
47ecf39e75 (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: Galen Charlton <gmcharlt@gmail.com>
2009-08-05 20:11:00 -04:00
Sébastien Hinderer
7fa051d837 bug 3440: C4/Branch.pm: the branch{zip,city,country,url,notes} rows should be taken into account during Add and Mod operations.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-01 09:44:32 -04:00
Colin Campbell
77e4b2ce9d Stop generation of unnecessary warning messages to log over undef values
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-01 08:39:57 -04:00
Henri-Damien LAURENT
08f0f8cba5 Installer break utf8 for DBD::mysql
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-01 08:30:21 -04:00
Garry Collum
b904347142 Bug 3452: Additional patch that expands the branch name and category code in Suggestions Management.
Displays the Branch name and Category description along with their codes in Suggestion Management.

Also since I joined to the branches table the 'map' function in opac-suggestions.pl to retrieve the branchname was no longer necessary.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 22:05:22 -04:00
Colin Campbell
5962dee647 bug 3434 Fix SQL Syntax Error when setting claimdate
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 21:22:39 -04:00
Colin Campbell
05be94ba9a User will find it useful to see the date claimed
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 21:22:13 -04:00
Galen Charlton
99afd35871 bug 3435: added missing _ in _FixAccountForLostAndReturned
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 14:36:30 -04:00
Galen Charlton
d903e7531f bug 3435 followup: tweak AddReturn cleanup
We're returning issue information when available,
not just item information.  Fixes problem where
circ/returns.pl wasn't displaying the due date
and patron when returning a loan.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:29:45 -04:00
Joe Atzberger
d24d147831 bug 3435: SIP2 - 3M extension for SmartChute checkin.
Implement the optional fields: CR CS CT CV CY and DA.
Also silenced some outstanding debugging print statements.
Consolidated similar accesseor subs in Patron.pm to use x_items.
Adjust SIP tests to specify correct AP (location).  Add a 3rd item
to SIPtext.pm for later use.

Note CT (destination) is currently populated with destination branch code.
We can adjust that to be destination branch name, or some combination in
a subsequent patch if necessary.

This work was sponsored by the Northeast Kansas Library system.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:53 -04:00
Joe Atzberger
51e8fc2cb6 bug 3435: AddReturn overhaul.
Required for SIP checkin implementation, but also for internal correctness.
AddReturn had too many things going on, with no guarantee of data being
available for the later calls.  At some point we started tacking on all the
branch transfer logic without testing edge cases.  In particular, $borrower
is not checked to be sure it is defined, considering the item may not have been
checked out so no borrower would be associated.  That means that CircControl
of "PatronLibrary" would be inaccurate, Circ Alerts will be totally confused
(untargeted), and the Fix... subs would fail.

Note that *many* errors are still present in _FixAccountForLostAndReturned, including
those where comments are added, such that it might behave strangely even with $borrower.

Renamed the internal subs with leading underscore, per convention.  Changed
the arguments to be scalars when only scalars are needed, not entire objects.
Added depth to WrongBranch message that includes Rightbranch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:50 -04:00
Joe Atzberger
08816bab07 bug 3435: SIP Checkin extension for 3M SmartChute - partial
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-30 11:06:47 -04:00
Joe Atzberger
b36269ea85 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-07-29 22:06:55 -04:00
Joe Atzberger
08c158319d 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>
2009-07-29 21:51:38 -04:00
Garry Collum
11f05061cc Bug 3452: Displays borrower category and adds links to Suggestions Management
A couple of enhancments to Suggestions Management.

Adds a display of the borrower category of the suggesting patron for each item.

Adds links to the title and author displays so that the catalog can be quickly search for an existing bib.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-29 21:39:44 -04:00
Kyle M Hall
38b356da8b Bugfix 2339 - Place hold button display with AllowOnShelfHolds OFF
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-29 21:15:13 -04:00
Galen Charlton
3ed41a2cfc Revert "Bug 3226 - Extended characters inconsistantly displayed"
This reverts commit 7a3bdce23d.

Even though patches were submitted that fixed the breakage
that this commit caused to NoZebra searchs, it turns out
this breaks code that uses SimpleSearch - clients of that
routine currently expect ISO2709 blobs, not MARCXML.

No further patches for 3226 will be pushed until a complete,
comprehensive patchset is submitted that (a) includes a
test case for the original bug and (b) demonstrates that
it doesn't break any aspect of bibliographic and authority
searching.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-27 20:57:10 -04:00
Joe Atzberger
232aa85009 Fix POD for GetReservesFromBiblionumber
Only one argument is needed, as the name suggests.
Also removed unused package variable, added comments.

Fix POD for GetReservesFromBiblionumber

Only one argument is needed, as the name suggests.
Also removed unused package variable, added comments.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:27:39 -04:00
Joe Atzberger
3dac018ccf Cleanup _Findgroupreserve.
Mostly formatting SELECT statement for readability.  Also updated POD
and added a comment.  This command:
    git diff -w C4/Reserves.pm
shows only the POD and comment chnages.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:27:36 -04:00
Joe Atzberger
d313335cc3 Correct GetItemIssue to actually return undef if item not checked out.
Updated POD for correctness.
Replaced strftime + regexp w/ C4::Dates->today.
Also removed some sth->finish statements.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 11:15:04 -04:00
Joe Atzberger
1d6a840168 Give Overdues a few whacks with perltidy
This was, an in part still is, some of the worst-formatted code in Koha.

Also made a few minor changes:
~ removing sth->finish
~ adding comment
~ removed whitespace error trailing spaces
~ use trinary op, like: return ( $debarredstatus eq '1' ? 1 : 0 );

Note that the logic is the same, even where I condsider it faulty.
(In the exampe case, because $debarredstatus may be undef.)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:54:35 -04:00
Colin Campbell
68a8b49bf2 Explicitly set _find_value's return to a string if not defined
Avoids generating a slew of warnings in the log when the undefined
 value was concatenated or used in regexps

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:17:58 -04:00
Darrell Ulm
c6e8088db4 Bug#: 3230 Penny fine, needs fixed, just a round off. Please
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:17:48 -04:00
Galen Charlton
ea62d6e72f followup to AddReturn patch - fix test
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:15:32 -04:00
Galen Charlton
06bc2468ba check $debug to print debug info only when wanted
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-22 10:15:29 -04:00
Joe Atzberger
21725c3a2c 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-07-22 10:14:49 -04:00
a073d84092 Bug 3423 - In Cataloging, fields are not ordered by tag number
In cataloging, depending on installation and how biblio framework has been
created/modified, fields are not displayed ordered by tag number. For example,
in UNIMARC you can have in tab '2':

  225
  200
  210

This patch order fields in tabs by tag and letter in the tag.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-20 21:29:57 -04:00
7a3bdce23d Bug 3226 - Extended characters inconsistantly displayed
When displayed on result page, some UNIMARC biblio
records are marc8 to utf8 converted for whatever
reason! It appears that iso2709 records in Zebra can't
always properly by used to construct MARC::Record.
This patch ask Zebra to return xml record rather than
iso2709 and use it to create MARC::Record (like
C4::GetMarcBiblio). i

Fix facet display.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-15 09:22:02 -04:00
Galen Charlton
7013085ca5 Revert "Bug 3226 - Extended characters inconsistantly displayed"
This reverts commit 1ddb5df863.
2009-07-14 23:35:16 -04:00
Nahuel ANGELINETTI
2e0a0dbf5a (bug #3405) fix on loan list in search result
The hash keys were made using a base and $item->{date_due}, but this key doesn't exists, so the possibility to have duplicate keys exists, and sometimes the others items were not shown. This patch fix this bug.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 23:24:25 -04:00
1ddb5df863 Bug 3226 - Extended characters inconsistantly displayed
When displayed on result page, some UNIMARC biblio
records are marc8 to utf8 converted for whatever
reason! It appears that iso2709 records in Zebra can't
always properly by used to construct MARC::Record.
This patch ask Zebra to return xml record rather than
iso2709 and use it to create MARC::Record (like
C4::GetMarcBiblio).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 23:06:50 -04:00
Ryan Higgins
e492747a6f 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-07-14 22:32:46 -04:00
Joe Atzberger
46b9ee7a93 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-07-14 21:39:00 -04:00
Joe Atzberger
7c2e7ad410 LDAP overhaul
Allow replicate and update to be zero.
Break out logic into separate subs.
Do only one bind attempt depending on setting, instead of
necessarily failing first before trying auth_by_bind.

POD added for active directory and to document permutations of
behavior given different conditions.  Fixed mistaken debug lines
that called "print STDERR printf ...", i.e. printed the line to output
and "1" to the error log.  Added principal_name feature for generating
bind user from Koha userid.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-14 21:28:16 -04:00
Chris Nighswonger
d1e03bbf11 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-07-13 08:19:56 -04:00
Chris Nighswonger
f779f9815c Bug 3390 Barcodes not displayed in Acro Reader >v7.0
Label pdfs containing barcodes generated by Koha do not display barcodes
properly in Adobe Reader >v7.0.

This does not appear to be a bug in Koha code nor in PDF::Reuse::Barcode code,
but rather in the backward compatibility of Adobe Reader.

This patch changes the barcode embedding method from a Type3
font to graphical embedding which appears to work around the issue.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-13 08:19:51 -04:00
Ricardo Dias Marques
492759e5f2 Fix for Bug 2599 - Search limits not working for NoZebra
Adds the change suggested by Amer Denni to fix Bug 2599
in comment #7 at:

http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2599

For UNIMARC installations, this patch only works after
updating the "NoZebraIndexes" system preference to
UNIMARC indexes (by default, NoZebraIndexes is being
wrongly set to MARC21 values in UNIMARC installations).

That has also been reported as a Bug, by me (see Bug 2178):

Bug 2178 - "NoZebraIndexes" system preference is being set
to MARC21 values in UNIMARC installations
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2178

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-12 23:46:25 -04:00
Garry Collum
45069c1ca4 Bug 3229: Fixes sort-by feature for jquery tablesorter in lists.
This patch adds some variables for the sortfield that are passed through the URL so that the sort-by feature works when the jquery tablesorter is used for a list of titles in opac-shelves.tmpl.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-29 14:09:28 -05:00
Garry Collum
1a8aac38b6 Bug 3347: Inconsistencies with public and private list tables in opac-shelves.tmpl.
This patch fixes inconsistencies with the public and private list tables in opac-shelves.tmpl.  It adds a "new list" link to the public list view, and it adds a "sort by" column.

This patch also removes the toggle variables from the tables in opac-shelves.tmpl and Page.pm, and uses the template __odd__ variable for table highlighting if javascript is turned off.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-29 14:02:28 -05:00
Joe Atzberger
e8908c2f97 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-06-24 09:44:39 -05:00
Joe Atzberger
5169a4cb4a checkoverdues should not require $dbh
Passing $dbh around is an ancient style that doesn't know
to use C4::Context.  C4::Context->dbh is efficient, especially
for modules that already use Context, including almost all C4.

I also internalized $today into the SQL using NOW() in the query
and removed sth->finish.  Even though I dislike the return style
that gives the count, then the array, I left it becuase I don't
have time to fix/test all the callers.  However, I did convert
it so it doesn't require a $count variable and its own loop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:35:12 -05:00
Joe Atzberger
a6890b2066 Return amount for CREDITS, POD rework.
The main change here is to get an {amount} field for CREDITS,
not just CHARGES.  I also use a fallback to default value (5)
in case noissuescharge has been deleted or set to 0.

POD is reworked to keep the salient chunks
about patronflags in the correct section and format them for
easier reference.  Deprecated display layer code.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:31:45 -05:00
Joe Atzberger
c177ac05f6 Cleanup Members.pm - minor
MoveMemberToDeleted is problematic.  It has a bad name, since it
only copies, not moves.  Also the POD for it referenced a totally
different function name and was largely useless.  Sanity checks inserted.

A couple sth->finish removed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:31:44 -05:00
Joe Atzberger
4017d2449d Remove unused variable and add FIXME.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:15:58 -05:00
Joe Atzberger (siptest
ddc6310673 Functional SIP run and shutdown scripts. Update example SIPconfig.xml
Note the shutdown script is quick and dirty, and probably
platform (debian) specific.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 09:00:50 -05:00
Joe Atzberger
5961c08a9e Bug 3350 - fail on queued emails w/ no address
If a patron has no email address, we need to avoid stockpiling all
their messages indefinitely.  Otherwise they get mailbombed when
their email IS added.

Note that overdues should not be affected, since the overdues job
checks whether the patron email exists before sending the message
(falling back to the admin).  The other messaging features are the
targets affected by this patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-24 08:43:45 -05:00
Joe Atzberger
b9be34a9d6 Correct POD and misleading variable names from copy/paste laziness
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-19 06:09:53 -05:00
Galen Charlton
09279e2334 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-06-19 06:01:27 -05:00
Galen Charlton
5dd3a9c157 use Memoize to cache results of GetAuthorisedValues
Thanks to Frédéric Demians for the original impetus
to improve this function and for doing profiling.

Note that Memoize is a core module since at least 5.8.0.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-19 05:56:29 -05:00
Joe Atzberger (siptest
01ec1e0a3d Expand interactive SIP tests.
Also tweak interactive item dump to suppress huge fields (marc, marcxml).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-17 11:42:44 -05:00
MJ Ray
d3c734c750 Use strftime to format sessionlog times
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-15 12:43:28 -05:00
b216babdf8 Fix bug 3330 - Report notes modification
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-15 12:43:18 -05:00
Galen Charlton
2d880c73d1 removing disused C4::Serials functions
The following functions are no longer in use:

* old_newsubscription
* old_modsubscription
* old_getserials

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-09 09:31:12 -05:00
d4f6022e43 Bug 3316 - Improve last 3 issues displayed on OPAC detail page
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-09 09:17:24 -05:00
Galen Charlton
ecdf595208 bug 3314: remove disused scripts and API functions
The distributedto column of the subscription table is
no longer used, having been replaced by the serials
routing list table.  This patch removes two C4::Serials
functions and a script and template, none of which were
reachable by current code:

C4::Serials::GetDistributedTo()
C4::Serials::SetDistributedTo()
koha-tmpl/intranet-tmpl/prog/en/modules/serials/distributedto.tmpl
serials/distributedto.pl

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 17:03:05 -05:00
Galen Charlton
58920538f1 bug 2505: enable warnings in C4::Breeding
* also start to standardize ISBN normalization

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:25 -05:00
Galen Charlton
d199488f09 bug 2505: enable warnings in C4::Log
Also corrected several links to viewlog.pl that
didn't take into account the recent renaming
of one of its parameters from 'module' to 'modules'

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:24 -05:00
Galen Charlton
1455d663d6 bug 2505: enable warnings in call number normalization modules
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:23 -05:00
Galen Charlton
27c2b318ef bug 2505: enable warnings in C4/Input.pm
Also removed POD containing disused function
checkvalidisbn.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:20 -05:00
Galen Charlton
ed014edad7 bug 2505: enable warnings in C4::ImportBatch and C4::Matcher
Also fix issues with normalizing ISBNs and the default
normalizer in C4::Matcher.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:19 -05:00
Galen Charlton
c53c9ff8c6 bug 3303: removed references to news_channels*
Removed routines in C4/NewsChannels.pm that refered
to missing database tables news_channels and news_channel_categories.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:18 -05:00
Galen Charlton
456e2a65b3 bug 3302: removed disused references to opac_electronic
Removed routines in C4/NewsChannels.pm that refer to
a missing opac_electronic table.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:17 -05:00
Galen Charlton
7bd4980db7 bug 2505: enabled warnings in C4::NewsChannels
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:16 -05:00
Galen Charlton
a244ff6671 bug 2505: turn on warnings in seven modules
C4::XSLT
C4::VirtualShelves
C4::Review
C4::Output
C4::Boolean
C4::Charset
C4::Stats

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:16 -05:00
Galen Charlton
62ab2a77c4 additional cleanup in GetItemsInfo()
* remove unused variable
* moved declaration of $count_reseves

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 14:32:58 -05:00
David Birmingham
86ec07d50b Removed a buggy conditional if that resulted in an incorrect item status
Previous conditional check with if ($restype) is not needed because a true
result for one item will result in subsqeuent items defaulting to this true
value.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 14:22:21 -05:00
Galen Charlton
ea42477090 bug 3299: fix setting renewal due date explicitly
When renewing a loan from the patron details page, setting
the renewal due date now works again.  Broken by patch
for bug 2770.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 13:17:08 -05:00
Galen Charlton
da51de184c bug 2926: fix staging import hang
Fixes a hang of the staging import tool when it
attempts to process a MARC21 record that claims
that it's UTF-8 when it is not.  The staging import
will now attempt to fix the character encoding of such
records.

Also added a FIXME to bulkmarcimport.pl, which because
of its use of MARC::Batch will skip over such records -
better than the original hang of the staging import, but
worse than the staging import's new ability to fix such
records.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 13:17:06 -05:00
Joe Atzberger
4677ae7390 Cleanup selectbranchprinter.pl and .tmpl
Use GetBranchesLoop and warnings.  Remove unused code.  Moved the Get's to after auth.
I begin to show how this script will use referer to redirect back to the sending
page upon successful change of branch or printer (see hidden div and recycle_loop).

Indicator for singleBranchMode added.
Also added another helper function for GetBranchesLoop, namely mybranch.  This
encapsulates the logic for finding an intelligent default selection, which is
almost always desirable.

This does not resolve bug 2426, but is work in that direction.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:30:52 -05:00
Galen Charlton
5375a71070 followup previous patch - remove disused $opacstylesheet
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:06:57 -05:00
Joe Atzberger
f35b144668 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-06-05 17:03:13 -05:00
Liz Rea
0c29750106 Bug 3289 - Fixed bad conditional check that made news items not show up until the day after pubdate.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 16:53:05 -05:00
Joe Atzberger
1c1c585073 Minor POD update - copied section doesn't apply to other function
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-03 14:48:44 -05:00
Garry Collum
e3eeda2fb1 Bug 3268: Adds the ability to edit the description of a holiday.
Adds another radio button to the edit holiday form. This is a partial fix, because you cannot make an edit to a single holiday for multiple branches.

Also fixed a small XHTML error and a wording error from my previous patch on holidays.tmpl (bug 3274).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-03 13:26:40 -05:00
Paul Poulain
950f753f11 fix for #2884: Add error management to branches
While trying to add a new Branch with an existing Branch code, the UI says "Library saved" instead of something such as "Please select a unique branch code".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 19:55:09 -05:00
Galen Charlton
dfdbb91fcb fix permissions error introduced in prior patch 2009-05-28 18:47:01 -05:00
Paul Poulain
ec6fc4f449 removing comments
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:32:39 -05:00
Paul Poulain
4ce1f9c4da Fixing API of ModBiblioMarc
no need to retrieve $biblionumber, as we already know it

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:31:57 -05:00
Paul Poulain
6924e7d6b4 fix for 2997 : superlibrarian's ability to edit item/patron home branch affected if all other privileges are selected
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.

I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:06:46 -05:00
Joe Atzberger
82f362673c Allow option to preserve Extended Attributes on patron import update.
Essentially, this patch provides the option to overwrite only matching
Extended Attributes, instead of all of them, treating the ext. fields more
like normal fields.

Several functions added to Members::Attributes with corresponding tests.

[ LL ref. 342 ]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 06:50:39 -05:00
Galen Charlton
17ab0a7532 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-05-28 06:42:20 -05:00
Galen Charlton
ee4de2f652 various improvements to subscription editing
* fix XHTML errors in template
* the patron notification type is now correctly
  displayed when editing a subscription
* turned on warnings (bug 2505)
* added ability to modify the grace period, missed
  in initial patch for bug 3020

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 11:59:57 -05:00
Henri-Damien LAURENT
af32ae0962 Adding and managing location in subscription
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 11:59:55 -05:00
Ryan Higgins
ca5e412c1b 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-05-27 10:52:23 -05:00
Chris Nighswonger
e72a02e08b 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-05-27 10:45:36 -05:00
Jesse Weaver
3206d0fe3c Small documentation improvement for C4::Service
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 10:08:36 -05:00
Galen Charlton
53b944b5f5 fix uninitialized value warnings during COinS generation
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-27 09:02:14 -05:00
Galen Charlton
3cfa84362f 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-05-27 07:06:20 -05:00
Galen Charlton
c27b542153 corrected POD for NewSubscription()
Merge serials display and grace period
changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:46:36 -05:00
Nahuel ANGELINETTI
3b1d91d04f (bug #3020) add a grace period to subscriptions
This patch modify the database to have a grace period which can be set. And is used to create automatically new waited issues with a
cronjob(which is in this patch), and set old issues to "late" status.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:46:36 -05:00
Galen Charlton
17475d7772 bug 3222: tweak sending of hold filled notification
Send a hold filled notification only when the item
is (assumed) to enter the hold shelf, i.e., when
the request status (reserves.found) is set to 'W'.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:57 -05:00
Galen Charlton
b6e62489d8 bug 3222: moved messaging preference editing
The display and editing of messaging preferences
for a patron have been moved as follows:

* the prefs for a patron are now displayed on the
  patron details tab, not the messaging tab.
* the prefs are now modified by editing the patron
  record, not on the messaging tab.

The messaging tab now contains only the list of
messages that have been or will be sent to the patron.

When creating a new patron record, changing the patron
category via the category dropdown now also changes
the default messaging preferences for that patron.  If
you start editing a new patron, change one of the messaging
preferences, then change the patron category, the form will
ask you if you want to keep the preferences or get
the defaults belonging to the new patron category.

Note that when you edit an existing patron record, changing
the patron category will *not* cause the messaging preferences
to be automatically changed.

Programmer's note: this commit introduces a new web service,
members/default_messagingprefs.pl, that uses Jesse Weaver's
C4::Service module.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:56 -05:00
Galen Charlton
8e5eea5c4e bug 3222: set messaging preferences during patron import
If the EnhancedMessagingPreferences option is ON, when
creating a new patron record via the patron import, set
the default messaging preferences to the applicable values
the default preferences for the patron category.

Messaging preferences are currently changed only when
*adding* a patron record via the import; if the import
updates an existing record, the patron's existing
preferences are not changed.

API changes:

SetMessagingPreferencesFromDefaults() is a new function
in C4::Members::Messaging to unconditionally replace
the current messaging preferences of a patron with the
default preferences from a specified patron category.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:53 -05:00
Galen Charlton
224a0a1bac bug 3222: new module to handle messaging preferences form
Define and use a new module, C4::Form::MessagingPreferences,
to handle displaying and processing the messaging preferences
form.  This change reduces code duplication between OPAC
and staff.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:50 -05:00
Galen Charlton
2288b86fbb bug 3222: C4::Members::Messaging changes
Updated GetMessagingPreferences() and SetMessagingPreferences()
in this module to allow a categorycode to be passed
instead of a borrowernumber, permitting default preferences
for a patron category to be stored.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 13:20:48 -05:00
Joe Atzberger
70c6a9fdf3 Bug 3239 - Content-Script-Type and Content-Style-Type
This adds headers to define the default script and style languages.
Please note that this output isn't 100% canonical from CGI yet, but
that is due to a bug in CGI:
  http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3243

So either CGI will perfect it's output, or we can switch to using
HTTP::Headers.  The latter may be desirable anyway, since then we
would not need a CGI $query argument at all.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 08:05:48 -05:00
Joe Atzberger
6cc8cb75f8 Cleanup C4/Stats.pm
Use C4::Debug.  Remove $sth->finish and an unconditional warn.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-22 06:47:52 -05:00
Galen Charlton
ca0b430068 bug 2726: updated doc to explain auth_by_bind option
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 14:27:27 -05:00
Michael Hafen
083ad362e1 in Auth_with_ldap.pm try binding with user password or compare
This changes the checkpw code in Auth_with_ldap.  Along with comparing
the user entered password against the directory attibute userPassword
you can try to bind with the users dn and password.

This is controlled by the option auth_by_bind, which, if set, causes
this code to try binding instead of comparing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 14:19:49 -05:00
Galen Charlton
74fd29d797 clean up redundant test
Credit to Joe Atzberger for cathing this.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 09:00:52 -05:00
Nahuel ANGELINETTI
6640cca486 (bug #3235) improve searchorder
If an supplierid is provided with a ordernumber, the search should be able to return everytime a record. This patch do the job.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:49:42 -05:00
Nahuel ANGELINETTI
a063e94c94 (bug #3149) fix searchorder
this patch fix the searchorder function, and add to the SQL query a "AND biblionumber" statement if a biblionumber is speficied.
Sometimes C4::Acquisitions::searchorder() find more than one result, so the user is looping to the same page to choose the great record, adding a contraint to biblionumber allows to be more strict.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:49:32 -05:00
Galen Charlton
d8bd2345ed bug 3120: tweak DDCN call number splitting for labels
Allow a call number of the form MP3-CD F PARKER to be split as

MP3-CD
F
PARKER

instead of

MP
3
-CD
F
PARKER

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:01:41 -05:00
Joe Atzberger
4f9d77ed32 Add onlymine helper function.
This should allow scripts to use GetBranchesLoop without having to reproduce
the check for:
(1) IndependantBranches,
(2) User logged in,
(3) User Not superlibrarian, and
(4) User branch set.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 08:01:39 -05:00
Galen Charlton
3f49ad62c8 bug 3236: remove disused scripts and a function
Removed opac/opac-dictionary.pl and catalogue/dictionary.pl,
which were not in use and not linked to from any active
template files.  According to Henri, the functionality that
these scripts implemented hasn't been working since 2.2.

Also removed C4::Search::findseealso(), which was used
only by the two scripts.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-20 08:37:58 -05:00
Galen Charlton
cf0b277f55 fix undefined variable warnings when using Syndetics
Also consolidate duplicate code to a new routine,
_fetch_syndetics_content()

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-15 15:52:25 -05:00
d470e2b932 Improve XSLT.pm performances
This patch is done in the process of understanding what's
going wrong with bug #3226. It improves some processing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-15 09:48:27 -05:00
Garry Collum
ec73dc92f9 Bug 1440: Show a list of holidays. Fix for the date formats.
This patch fixes the date formats in the holiday display tables.  They are now based on the syspref for date formats.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-15 09:48:25 -05:00
Galen Charlton
53637c5e14 fix small POD error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 07:34:12 -05:00
Pianohacker
b04f432857 New framework for AJAX services
This adds two new C4 modules, C4::Service and ::Output::JSONStream, and
makes important modifications to C4::Output. The first two are a basic
framework for JSON-based AJAX services and a simple JSON output wrapper,
respectively. C4::Output has been slightly refactored, with a new
function, output_with_http_headers, that supports different
content-types. output_html_with_http_headers still exists, and the three
pages affected by this change have been refactored to support it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 07:29:18 -05:00
Nahuel ANGELINETTI
e6915c6b5f (bug #1578) change the shelf COinS support
this change the old COinS support, and now use C4::Biblio::GetCOinSBiblio().

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 19:12:28 -05:00
Galen Charlton
a6c339aa69 add subtitle to COinS for MARC21
Preserves change added in the LTFL integration
while also switching to Nahuel's COinS implementation.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 19:05:32 -05:00
Nahuel ANGELINETTI
efaa4bb82c (bug #1578) fix a little error in code
This one, fix the use of "or" instead of "||", else a warning is raised.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 19:05:32 -05:00
Nahuel ANGELINETTI
6b8992ef0f (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: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 19:05:32 -05:00
Galen Charlton
6085209dd3 excised hard-coded reference to HLT
Note to Chris Cormack: I suspect the current ability
to override most circulation conditions is sufficient,
but if HLT still needs to establish a patron category
that can ignore issuingimpossible limitations, needs
to be done in a more flexible way.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:23:42 -05:00
Galen Charlton
5899badc3e fix to CanBookBeIssued()
Bail out if item does not exist - otherwise
subsequent checks can fail for lack of an
item branchcode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 16:11:36 -05:00
Nahuel Angelinetti
314e818294 fix the previous patch to add a syspref that permit to choose the renewal period(day or date_due).
This patch just check the syspref and use it as base date of renew.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 15:20:09 -05:00
Nahuel Angelinetti
3587400ea7 change the date calc, to set the date_due to date_due+loanlength.
At the moment when you renew a document the date_due calculated is now+loanlength, but it's a bad thing, It should be
date_due+loanlength.
This patch do change Circulation.pm to use the date_due as renew base and add the loanlength to get the new date_due after
renewal.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 15:16:34 -05:00
Paul Poulain
d496e3111a fix for #988
When a borrower can't issue any book (issuingrules=0), the message should be
"this user can't issue book" and not "too many books already issued"wrong message

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 14:24:47 -05:00
Nahuel Angelinetti
f4649ab6a3 Add a date field in news edition, and permit to set the "timestamp" field, that is the publication date and modify the GetNewsToDisplay to return only news that timestamp is < to current date that permit to publish news later without any action.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 14:12:59 -05:00
8246a7dce8 Bugfix 3176 - Browser selected languages are not use by OPAC
This patch uses HTTP_ACCEPT_LANGUAGE web browser variable
to select OPAC available language.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:13:24 -05:00
Michael Hafen
0b50aecaf7 Tweak ceilingDueDate and CalcDateDue
This patch moves ceilingDueDate and ReturnBeforeExpiry checking into
CalcDateDue(), so the renewal due date is also calculated with those.

Also restores a check in CanBookBeIssued.  If the due date isn't given
call CalcDateDue and make sure it's not in the past.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:03:21 -05:00
Nahuel ANGELINETTI
b1180360a8 (bug #3196) fix itemlost.pl
This patch fix 3 things:
* fix order by
* take care of item_level-itype
* use join in sql query

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 08:34:07 -05:00
Galen Charlton
b244cac492 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-05-11 07:47:09 -05:00
5ef1d6ff9e 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-05-11 07:35:53 -05:00
Ryan Higgins
af2c4340ad bug 3195 : Item Transfers and Holds disrupted.
This follows revert of commit 257a439d (bug 3025).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:39 -05:00
Ryan Higgins
09a5613586 Revert "(bug #3025) multiple check-in of a multiple times reserved item go wrong"
This reverts commit 257a439daf.
This patch causes Bug 3195 .

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 11:18:37 -05:00
Nahuel ANGELINETTI
78756abc37 (bug #3174) show the member name in reports
this patch show the member firstname and surname instead of only the borrowernumber in the guided reports page

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 10:17:30 -05:00
Nahuel ANGELINETTI
1a4e67c143 (bug #3183) fix the SetMarcUnicodeFlag function
This patch fix the funciton SetMarcUnicodeFlag for UNIMARC support, now the function will fix the length of the field, and set encoding as "50  " instead of "5050".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 08:23:14 -05:00
15d95fdd0e Optimize XSLT.pm
Avoid reading marc_tag_structure for each biblo record to
transform by XSLT. Not totaly useless on OPAC result page.
Should be done via application variables rather than
request variable, but this is another story.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 07:54:08 -05:00
1d2ec60fbd Bug 2944 fix courtesy of Amr Denni
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 07:22:49 -05:00
Colin Campbell
3b6c36a4f3 Moved some variable definitions out of conditionals
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 17:08:16 -05:00
Nahuel ANGELINETTI
1310c8e2ac (bug #3193) fix the comtd value in acqui-home.pl
this patch fix the value of the comtd value which is not the same as in bookfund.pl, clicking on the value from acqui-home.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-07 16:42:03 -05:00
Chris Cormack
d32d5bfb9b Adding warnings, fixing a bug that meant the title of an item that had a fine was never printed
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 17:06:53 -05:00
Nahuel ANGELINETTI
4dbe34f231 (bug #3174) fill borrower number, and show author and creation date in saved reports
This patch add 2 columns in "Use Saved" page whith creation date, and the creator id.
It fix the creation of a report, to save the borrowernumber in reports table(to show it after).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 16:25:36 -05:00
Galen Charlton
53ace84401 Syndetics: add support for AVSUMMARY and AVPROFILE
Added support for the Syndetics AV summary and AV profile
data elements.  The AV summary is displayed in the description
tab if present, while the AV profile is displayed as
a link off of the OPAC bib details page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:19:19 -05:00
Galen Charlton
050f9115de Syndetics: start switch to XML::LibXML to parse results
XML::Simple doesn't handle mixed content, which is a
problem because reviews provided by Syndetics sometimes
contain HTML tags.  Furthermore, it's often easier to write
XPath to extract bits of an XML document than trying
to play with XML::Simple's options.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:17:24 -05:00
Galen Charlton
631c7008f9 Syndetics: handle variations in reviews XML output
For some reason different Syndetics users get
slightly different results when requesting
an XML-formatted review, so it's necessary to
handle both observed variations:

Here's one variation:

...
<Notes>
    <Fld520 I1="BLANK" I2="BLANK">
    <a>This is a review

And another:
...
<Notes>
    <Fld520 I1="BLANK" I2="BLANK">
        This is a review

This patch fixes a bug where some users the
source of a review but not the review itself.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:45 -05:00
Galen Charlton
4d95af2968 fix to C4::Koha::_isbn_cleanup
Both valid ISBN-10s and -13s can use 'X' as a checkdigit
value.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:41 -05:00
Joe Atzberger
ccb64c18ee Bug 3177 - haspermission offers bogus option
$intflags was never used or returned if hashref instead of userid was passed.
Also cleaned up needless passing of $dbh.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:20 -05:00
Ryan Higgins
fa848a66f0 Bug 3179: Typo in C4::Circulation function call causes fatal error
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 07:16:15 -05:00
Mason James
f6571fa5c2 fix to remove blank newlines from labels
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-28 07:04:07 -05:00
Nahuel ANGELINETTI
632955332d (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: Galen Charlton <galen.charlton@liblime.com>
2009-04-28 06:43:49 -05:00
Galen Charlton
a2b1922b66 bug 2915 followup - small efficiency improvement
Following up on a suggestion by Joe Atzberger, save
a database query by not counting the subscriptions
to delete; instead, simply fetch a list of them.

No user-visible change.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 18:03:24 -05:00
Nahuel ANGELINETTI
43e4976806 (bug #2893) Allow loan forcing if a syspref is set
If the syspref 'AllowNotForLoanOverride'(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: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 14:29:30 -05:00
Marc Chantreux
6be431d79e _set_defaults_for_add easier to read
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 10:50:13 -05:00
Galen Charlton
786a1aa36a bug 3161: don't display blank language chooser
If more than one translation is installed but only one is active, a blank div
is displayed at the bottom of all pages in the intranet (and in the OPAC if the
opacchangelanguages system preference is ON), taking a bit of vertical real
estate needlessly.

Changed so that <div> for the language chooser is output
only if there is more than one enabled language.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 06:54:42 -05:00
33fffbcfd6 Bug 2920 Fixes Amazon content use in pro interface
This patch fixes Amazon content use in pro interface :

* Control Amazon Editorial Review by a new syspref:
  AmazonReviews.
* /catalogue/detail.tmpl doesn't display Amazon reader reviews.
  It displays only Editorial review in Description tab.
  This patch disable request for AWS reader reviews.
* Use Amazon TLD for linking book cover to local
  Amazon Search Inside.
* Minor clean up on C4::External::Amazon.pm

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-27 06:53:34 -05:00
199ec1473a Bugfix #2920 Avoid doing unecessary calls to Amazon Web Services
This patch modifies how AWS is called. AWS is now called
depending on syspref. It works completly for OPAC; it
has to be refined for intranet.

For OPAC:

  * If OPACAmazonReviews is set, AWS EditorialReview and
    Reviews (users) are grabed.
  * If OPACAmazonSimilarItems is set, AWS Similarities info
    are grabed.
  * If nothing is asked, AWS is not called anymore,
    sparing server bandwidth.

For intranet:

  It works as it used to work. AWS is called if AmazonEnabled
  is set whatever how other syspref are set.

  TODO:

    * Add a AmazonReviews syspref
    * Request Amazon content depending on AmazonSimilarities
      and AmazonReviews syspref

DOCUMENTATION:

  It should be explained that Amazon services related syspref
  have two levels:

  * AmazonEnable / OPACAmazonEnable
  * Other: OPACAmazonReviews (new), OPACAmazonSimilarProduct,
    OPACAmazonCover

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 10:36:14 -05:00
Galen Charlton
716c170b5d fix warning in C4::AuthoritiesMarc::merge()
"my" variable @X masks earlier declaration in same scope at C4/AuthoritiesMarc.pm line 1200

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 09:50:56 -05:00
Galen Charlton
b090b1c6e8 improved POD for C4::Serials::HasSubscriptionExpired()
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-26 09:50:55 -05:00
Henri-Damien LAURENT
dd9b33f1e9 Fix :Fatal Errors occurs when date is not a regular date
When the start date or the "current date" is not a regular date
the transformation and checkdate fails because there is no
Year/Month/Date
This patch makes it fail more 'silenty' for the users and raises an
error that could be coped with.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:37:04 -05:00
Nahuel ANGELINETTI
c5ca4f6391 (bug #2937) use check_date in C4::Serials::hassubscriptionexpired
This patch change the date check in hassubscriptionexpired to use Date_Calc::check_date

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:36:35 -05:00
Henri-Damien LAURENT
6c5f9d46d8 Removing map calls in void context
Thanks Joe.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:34:12 -05:00
Henri-Damien LAURENT
42bebf7a21 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:53 -05:00
Henri-Damien LAURENT
9289055703 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:33:20 -05:00
Henri-Damien LAURENT
385ffe5179 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:32:18 -05:00
Henri-Damien LAURENT
8b10335def 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:26:41 -05:00
Mason James
2a1501f539 BUG:3072 small work-around patch to restore authorities searching
this is a work-around fix, until a future patch arrives to define the missing 'Heading-Main' zebra-index.

for 3.0.x

[RM note: also included in HEAD so that I can include the UNIMARC(A)
 updates by HDL]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 22:04:16 -05:00
Henri-Damien LAURENT
40ab51d8f7 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:59:04 -05:00
Henri-Damien LAURENT
e5d1bced25 Adding some Error proof on GetAuthority
return undef if there is a problem

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:01:36 -05:00
Henri-Damien LAURENT
e7282020f7 Restoring startsby search on authorities.
[RM note: fixes bug 2792]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:56:58 -05:00
Mason James
866df9ce97 BUG-3160: fixes 'itemlost' check on item return.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:41:53 -05:00
Galen Charlton
1e6b61cdb1 changed OAI-PMH implementation
Replaced older OAI-PMH server implementation
with new one by Frédéric Demians.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 14:01:21 -05:00
Brian Harrington
4c4cae22da Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl.  I
also realized I can't count. :-)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 14:01:15 -05:00
David Goldfein
17923b97f6 Modified log reporting to allow multiple modules to be selected.
Reworked ViewLog.pl and the template.  Eliminated html errors, cleaned up
the template, change mime type to text/csv and other minor changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 13:36:16 -05:00
Michael Hafen
7d61fd62f5 New feature ceiling Due Date.
This adds a feature and system preference: ceilingDueDate.  If this is
set to a valid ( according to dateformat syspref ) date, then calculated
due dates will be less than this date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 12:49:54 -05:00
Joe Atzberger
6ad369f80b Cleanup and tighten Letters module.
Subroutine arguments enforced w/ with more checks, explicit return undef where warranted.
Placeholders used in SQL where applicable.
One logical error corrected :
- next MESSAGE if ( lc( $message->{'message_transport_type'} eq 'rss' ) );
+ next MESSAGE if ( lc($message->{'message_transport_type'}) eq 'rss' );

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 11:16:50 -05:00
Joe Atzberger
424eff89dd 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: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 10:55:53 -05:00
Michael Hafen
34d3399149 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.

[RM note: this patch means that an item's item-level item type,
 once that item is added or updated via additem.pl,
 now cannot be blank or NULL unless the biblio-level item type
 is blank.]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 10:26:57 -05:00
e6076612ba Fix for Bug 1877, Link to patron record from manage suggestions
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-21 18:44:02 -05:00
Brian Harrington
fe95a8ee9b Patch to improve auto-generated MARC21 authorities
This patch makes sure that MARC21 authorities have a minimal
Leader, 008, and 040.  If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-21 14:29:15 -05:00
Paul Poulain
9a0f685e14 fir for #2338
When I go to serials/claims.pl, "All Suppliers (2)" is selected in the supplier
dropdown list, and no missing issues are listed. When I choose another supplier
from that list ("Supplier 1 (2)"), then two missing issues are listed. Should
"All Suppliers" instead read "Choose a Supplier" ?

chris: I think it might be safe to remove the all suppliers option all together as its
doing nothing

paul: agreed, this patch removes the All Supplier line, that is useless, confusing & untranslatable

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-19 08:34:12 -05:00
Paul Poulain
ebfc2cdb1e Fix for 2363
There is a comma at the beginning that shouldn't be there and then there are
commas in the vol, no combo making it hard to read.  it should be something
like this:

Vol 28, No 7; Vol 28, No 8; Vol 28, No 9

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:36:21 -05:00
60fc079cfb Update for bug 1545 allowing for the title to be edited
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 18:36:16 -05:00
834001ffbb Allowing users to edit saved sql in guided reports. Bug 1545
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 14:59:02 -05:00
Galen Charlton
5889ea4c58 bug 2958: fix search results navigation for CCL, CQL, and PQF queries
The shortcut to build $query_cgi in C4::Search::buildQuery()
for CCL, CQL, and PQF queries is incorrect, as (for now)
the "q=" prefix is required.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 10:42:13 -05:00
Joe Atzberger
248e0392e2 Multi-bug fix - SetMarcUnicodeFlag for records coming from Koha
This has bearing on bugs 2905, 2665, 2514 and other "wide character" crashes
related to diacritics and Unicode.  This should help open the door for reliable
input of diacriticals via acquisitions.

MARC21_utf8_flag_fix.pl diagnoses and fixes existing problems with MARC data
affected by the bug.

Adding SetMarcUnicodeFlag to TransformKohaToMarc prevents the bug from corrupting
further data.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 09:14:43 -05:00
Joe Atzberger
cfc3f6471f Re-insert useldapserver into koha-conf.xml
This doesn't insert the large and typically unused <ldapserver> block,
just the switch with a comment pointing to C4::Auth_with_ldap.  This otherwise
was undocumented requirement, making LDAP config a bit of a shot in the dark.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 08:21:01 -05:00
Ryan Higgins
86ab0666a0 But 3117 : fix typo in C4::Matcher causing compilation failure.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-15 12:49:33 -05:00
Galen Charlton
14dd58e577 qualify warn; sort_by is not a required search parameter
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 15:54:20 -05:00
Galen Charlton
6a2a4e146e fix various warnings
* Use of uninitialized value in pattern match (m//) at C4/Biblio.pm line 1305
  (displaying MARC21 856s that don't have $3)
* Use of uninitialized value in multiplication (*) at catalogue/detail.pl line 243.
  (attemping to calculate average Amazon rating if no Amazon info
   is available)
* opac-detail.pl: Use of uninitialized value in length at C4/External/Amazon.pm line 90
  (attempting to calculate length of $isbn if it happens to be undef)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 15:54:19 -05:00
Galen Charlton
684cea4309 bug 3049: display correct due date of renewed loans
The intranet item display provided by moredetail.pl
would display the original due date of the item, and
would thus be incorrect if the item had been renewed
and got a different due date.

The incorrect date was coming from items.onloan,
which AddIssue() sets to the due date.  This patch
fixes the bug in two ways:

[1] AddRenewal() now updates items.onloan with the
    correct due date.
[2] Two templates were updated to display the
    due date from (indirectly) issues.date_due
    instead of items.onloan, thus making it less
    likely that the wrong value will be displayed.

This patch does *not* update items.onloan to reflect
the correct due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:32 -05:00
Nahuel ANGELINETTI
43bb27b8da (bug #2915) C4::Biblio::DelBiblio delete the serials
This patch add the serials deletion in DelBiblio function, so now when a record is deleted all attached serials will be too.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 14:51:30 -05:00
Henri-Damien LAURENT
dbe0d99371 auto truncation was not used
Auto truncation now works on LTR languages
For RTL languages(Arab, Hebrew), development should be really improved.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 13:01:30 -05:00
Joe Atzberger
35c8a5be58 Introduce sth caching to Letters.pm
The re-creation of statement handles for the same queries, repeatedly,
seriously degrades the performance of notices.  This introduces new
class-level caching to avoid that problem.

Note: initial provisions
to do the same with caching of COLUMNS information about tables is
also included, but this would probably be most usefully implemented
in C4::Context (or a separate more central module).  The benefits of
caching that info would probably be even greater.  Note that this
proposed implementation might be obsoleted by ORM integration, where
DB structure info would already be cached.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 13:01:23 -05:00
Nahuel ANGELINETTI
89c062c44b (bug #3053) extract ISBD view generator, and permit to display valuecode in ISBD view
this patch extract the generator of ISBD view in a C4 function, because it's used in intranet AND in OPAC but with 2 separate codes.
Now it's more reusable.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 11:16:34 -05:00
Joe Atzberger
6a2c518efa Add warning for unrecognized sort order.
This may help elucidate problems we are having with sorts that
do not seem to work.  I.E., if the inteface is requesting
unrecognized sort orders, we need to know about it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 11:01:35 -05:00
Galen Charlton
2e08f626f5 remove incomplete bib bulk editing code
Per discussion I had with Henri, removing experimental
bulk editing from the staff search results code, as
feature is incomplete and can be dangerous if
one tries to use it on a large search result
set.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-06 10:53:50 -05:00
Joe Atzberger
14be4400d8 Bug 3066 - Overhaul guided reports
execute_query now refactored, returns reliable results, does
zero presentation-layer crap.  Arguments reduced, client scripts
adapted to new API and performance improved.  Text::CSV now used
to generate CSV output, ensuring portability, encoding and accuracy.

Replaced tools/runreport.pl with misc/cronjobs/runreport.pl:
    ~ security fixed
    ~ documentation improved
    ~ TODO: finish sendmail option.

Bug 3077 also fixed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:17:55 -05:00
Joe Atzberger
1caa108ef0 runreport.pl and prep work on Guided.pm
The old location of runreport.pl was under tools, leaving it exposed
to web requests.  This is a security flaw since it does NOT check any
Auth and allows the user to request any Saved Report be run.  This is
not a problem under misc/crontab/ and it suggests the more appropriate use.

Guided.pm is not fixed here (see bug 3066), but it is prepared to be fixed
and made compatible with runreport as detailed in the perldoc.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:14:32 -05:00
Joe Atzberger
104de0640b Serial IF statements on same $variable should be ELSIFs.
Small POD update also.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 20:14:19 -05:00
Mason James
2fd01051fd patch for bug-3017
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:53:16 -05:00
Nahuel ANGELINETTI
4f8f297a23 (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

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:53:06 -05:00
02b5091c1a Internationalize Amazon support
With this patch:

  * On Amazon book cover, 'search inside' text is not displayed
    anymore because it's not translatable.
  * Link the image to local Amazon web site 'search inside' service.
    Based on AmazonLocale syspref.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:38:37 -05:00
J. David Bavousett
13cce1b3c5 Modifications to C4/Matcher for colon and ending punctuation
Recommended by Michele Maenpaa, this adds handling colon and end-punctuation stripping
in subroutine _normalize, and fixes length testing in subroutine _get_match_keys

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 19:10:49 -05:00
Joe Atzberger
657371808a DDCN callnumber splitting with test.
Similar to previous patch for LCCN splitting, this patch incorporates
changes to split_ddcn and supplies a test file for verifying proper
operation.  Note that the only previously documented example for intended
operation is included as one of the tests.

This regexps are created to be rather forgiving.  For example, the function
will not choke if two spaces were included where the "spec" (such as it is)
expects one.  Obviously this is because for CN splitting purposes, it doesn't
matter, we're not going to ever split in the middle of whitespace.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 18:47:48 -05:00
462dead372 Adding details to OPAC search results RSS, described in Bug 2973.
This includes a change to Search.pm to add a variable, subtitle_nospan, in order to display subtitles in the feed without search term highlighting HTML. The modified template attempts to display Amazon, Syndetics, or Baker & Taylor book cover images. Google images are not included because they require Javascript.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 18:22:04 -05:00
Daniel Sweeney
17b1412ceb Cleared a trailing warn, sorry.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 16:41:50 -05:00
Joshua Ferraro
65ddce02f2 Serials Display Enhancement
Allows specification of how many issues of a subscription to display
at a global and subscription-specific level. Also adds a link to the
detail page to a specific subscription.

Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-03 16:41:38 -05:00
066adc4a3e Fix Amazon cover for UNIMARC
In UNIMARC, 010 tag contains ISBN. In UNIMARC, ISBN with '-'
are valid. This patch modify ISBN normalization in order to
automaticaly suppress '-' before sending ISBN to Amazon
to get book cover.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-01 10:49:39 -05:00
Mason James
eb62fd74c1 fix to ignore 600$2 'Source of heading' fields for MARC21 subject display
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-01 10:49:28 -05:00
Henri-Damien LAURENT
32a84d56c5 Minor bug fix Documentation update : 3039
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 18:36:57 -05:00
Daniel Sweeney
0e76b374eb Changed syndetics base URI from syndetics.com to www.syndetics.com
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:52 -05:00
Daniel Sweeney
afde76f1c1 Added upc to content_identifier_exists criteria.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
bd5272f074 Fix for LL Bug 405: Syndetics Enhanced Content: some cover imags are being generated as IMGs but show as broken images
Adds new template variable to test for enhanced content identifiers

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
0547da0093 Fix for LL Bug 404: Syndetics Enhanced Content: Excerpts show with embedded HTML tags and entity references
XMLout needed the NoEscape option set

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
edcc606257 Syndetics Enhancement: adds upc/oclc to the functions to retrive non-image data
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
3d65e44d5c Syndetics and Amazon bugfix enhancements
This patch resolves a number of problems related to Enhanced Content:

1. Previously, there was no syspref for controlling whether or not to display
Amazon.com cover images apart from other content. This had the side effect
of preventing use of amazon.com content alongside use of another provider's
images. This patch introduces AmazonCoverImages and OPACAmazonCoverImages,
and changes the name of AmazonContent to AmazonEnabled.

So, for instance, you can now enable OPACAmazonSimilarItems yet utilize
SyndeticsCoverImages for displaying those similar items.

NOTE TO DOCUMENTATION TEAM: please update references to AmazonContent
and OPACAmazonContent to comply with the above.

2. Fixes some semantically incorrect uses of AmazonContent (now OPACAmazonEnabled)
on the OPAC side.

3. Resolves once and for all, the normalization of ISBN,UPC,EAN and OCLC numbers
for all enhanced content elements; These elements can be normalized using the
new functions in C4::Koha; I've replaced use of the various previously used
variables $xisbn,$norm_isbn,$clean_isbn, etc with $isbn, and the template
variable normalized_isbn.

We finally have a single, consistant place to retrieve normalize values for
these fields given a particular record.

4. Adds Syndetics attribution statements to display of all Syndetics content
'enhanced content provide by Syndetics' or 'Enhanced Description from Syndetics'

5. Adds an option to view the large cover image on the detail page on the OPAC
when using SyndeticsCoverImages; this option is controlled by a new system
preference: SyndeticsCoverImageSize which has two values: MC (medium) LC (large)

6. Adds UPC and OCLC numbers for Syndetics enhanced content queries especially
helpful for finding enhanced content for DVD and Music materials

7. Adds capability to display Syndetics images to opac-user for checkouts and overdues

8. Updates to systempreferences.sql, and updatedatabase.pl database revision 015

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:51 -05:00
Joshua Ferraro
9abcd844f5 Add Syndetics AuthorNotes, Awards, Series
This patch also includes a new function to retrieve the index
page from Syndetics and parse it for available content prior to
retrieving content; this is done to speed up syndetics content
by not retrieving content that doesn't exist for an item. However,
Syndetics continues to be a very slow service compared to Amazon.com
and other enhanced content services

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
11bd4a7660 Adds Syndetics Reviews
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
9806abf865 Adds support for Syndetics Excerpts and Editions
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
de6227bd0a Add Syndetics Summaries and TOC
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:50 -05:00
Joshua Ferraro
3d46ed59ee Add System Prefs for Syndetics to Auth
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Joshua Ferraro
69c74c06ae Move Amazon.pm to External/ directory
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 17:23:49 -05:00
Galen Charlton
3c04a7915a fix error introduced in a previous commit
Change to GetReservesFromBiblionumber() had effect
of causing all requests of constrainttype other
than 'o' to not be included in result.

while ($foo) {
    $bar or next;
    # do stuff
    # do other stuff
}

is not equivalent to

while ($foo) {
    if ($bar) {
        # do stuff
    }
    # do other stuff

}

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 10:39:33 -05:00
Joe Atzberger
6b3e5ce0dc Correct perldoc
Indentations misformatted for code blocks.  Also updated reference to
GetBranchesLoop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:13 -05:00
Joe Atzberger
9c8623fa13 Bug 2691 - LCCN split (for labels)
This corresponds with the test I submitted earlier and essentially
overrides the partial improvement from Nighswonger under Bug 2500.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:09 -05:00
Mason James
cd230c2a72 Resubmitting: fixes print statements with missing 'STDERR' in Auth_with_ldap.pm,
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:03 -05:00
Nahuel ANGELINETTI
257a439daf (bug #3025) multiple check-in of a multiple times reserved item go wrong
This patch check that an item is not "Waiting" before do something in GetOtherReserves(because is the item is waiting, we don't need to do something).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:58 -05:00
Joe Atzberger
ccee815f4a Bug 2617: Add strict (and warnings), partial fix.
These are some of the simpler scripts to add strict to.
Corrected perldoc for Bookfund.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:55 -05:00
Joe Atzberger
15443111e5 Trivial correction to comment.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:36:52 -05:00
Joe Atzberger
ba0ae6cd1c Branchoverdues circ report reworking.
branchoverdues.pl
~ Removed unused variables.
~ Use elsif where applicable.
~ Added many FIXMEs.
~ Added help description.
~ Changed link to more accurate description.
~ REFACTORED branchoverdues-specific function in C4 for obvious consolidation.

This report is still of questionable value, since it's dataset has such strange
hardcoded limitations.  It is not clear that "FU" type fines and notifys=0 are
reliable or useful indicators to query on, in hardcoded form.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 15:01:41 -06:00
Nahuel ANGELINETTI
04cb467401 (bug #2863) add the borrowers branchcodes in suggestion list
Not a big patch, just add the borrower branchcode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 14:19:11 -06:00
Galen Charlton
638482cf1a fix permissions error 2009-03-06 13:18:00 -06:00
Nahuel Angelinetti
3213ffc859 fix the sql request to work in all mysqls
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:18:00 -06:00
Joe Atzberger
621c211d43 Allow all argument forms to GetBranchesLoops.
Allow arguments to be specified in the negative (i.e. 0).
Allow function to be called with no arguments.

This supercedes the patch titled:
Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:03:48 -06:00
Joe Atzberger
c188100bf3 Allow GetBranchesLoop to intuit IndependantBranches if not specified in argument.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 13:00:43 -06:00
Joe Atzberger
3d3628a1a6 Add GetBranchLoop since so many pages use exactly the same code.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:59:27 -06:00
Joe Atzberger
0c84d36353 AddReserve had bogus prepare statement.
This patch was not fully tested because the actual behavior intended
by constraints 'o' and 'e' was apparently never implemented here.
But it had no chance of success as with:
    my $sth = $dbh->prepare("");

This uses the inteneded query, removes unneeded $sth->finish calls and
fixes *some* redeclaration of my $variables in the same scope, as
would be needed to run under warnings pragma.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:44:51 -06:00
Joe Atzberger
efa79c13b2 Basic cleanup of fixup_cardnumber
Avoid warning on syspref "checkdigit" undefined.
Functionality essentially unchanged.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:27:48 -06:00
Galen Charlton
e68c85db0e bug 2904: fix display of URLs in UNIMARC
This based on a patch by Nahuel ANGELINETTI; done to
merge changes with Mason's patch for 2951.  The original
patch description is:

in the previous patch the field used for link "name" was 856$z, but the unimarc doesn't specify this, it say to use the 856$2 fi
This patch make koha to use the 856$2."

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 12:18:12 -06:00
Mason James
6b6c8e1dea corrected patch for bug 2951
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 11:59:12 -06:00
koha
9c72711a2c This patch allows the Branch Transfer Limits feature to limit transfers either by itemtype ( like the original commit ) or collection code ( new feature ).
[Note inserted by RM: this patch is by Kyle Hall]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 11:27:16 -06:00
Nahuel Angelinetti
e080066db4 bug 2772: bad image location
This patch make Page.pm to use the getitemtypeinfo function to generate the imageurl, and check (in the template) if an
image is set.
Before this patch, always the "Alt" information was shown, because the url wasn't right.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 09:07:46 -06:00
Daniel Sweeney
ab28085949 Added a require C4::Heading to resolve a circular dependency.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 16:58:18 -06:00
Mason James
41cb983c3b fix for bug-2923, corrects renew status in SCO
- removes unneeded  HTML::Template::Pro
 - some indent/newline tidies

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 16:28:17 -06:00