Joe Atzberger [Fri, 27 Mar 2009 15:34:33 +0000 (10:34 -0500)]
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.
* 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.
These changes tidy up ISBN and ISSN indexing, per Michele Maenpaa. It's being
set up manually on many new installations, and probably ought to become part of the default
Koha installation.
-idmap <filename> - optional output file of
map of source record ID numbers
to Koha biblionumber
-x - if idmap is supplied, MARC tag
to get source record ID from
-y - if idmap is supplied, MARC subfield
to get source record ID from
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
Owen Leonard [Thu, 2 Apr 2009 19:06:33 +0000 (14:06 -0500)]
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.
Frederic Demians [Thu, 26 Mar 2009 20:54:24 +0000 (21:54 +0100)]
Add another OAI server
This OAI server has those characteristics:
* It doesn't use C4::OAI anymore.
* It uses HTTP::OAI library which is easily expandable.
* XML result is not build anymore directly but using
XML::SAX::Writer. It should solve encoding and XML related issues.
* It returns two formats: oai_dc and marcxml.
* DC is generated from biblioitems.marcxml by applying XSLT
(MARC21slim2OAIDC.xsl or UNIMARCslim2OAIDC.xsl).
* It uses the same tokens as previous OAI server (thanks Philippe
Jaillon).
* There is no more sets (it wasn't operational in previous version).
Add two new dependencies:
* HTTP::OAI
* XML::SAX::Writer
available as a Debian package: libxml-sax-writer-perl
Frédéric Demians [Mon, 30 Mar 2009 06:42:22 +0000 (08:42 +0200)]
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.
Joe Atzberger [Mon, 23 Mar 2009 21:25:21 +0000 (16:25 -0500)]
Improve performance and fault tolerance for sync_items...
Pulled the GetMarcFromKohaField outside the loop, since we only need to
check it once. Same for $item_sth. Added safety checks for success of
delete_field and GetMarcItem, with warnings on failure.
Frederic Demians [Fri, 13 Mar 2009 07:14:58 +0000 (08:14 +0100)]
Instructions and packages required for Debian Lenny Installation
INSTALL.debian-lenny
Instructions for installing Koha on Debian Lenny.
Based on INSTALL.debian. Almost all Perl modules are now available
via Debian packages. MySQL installation is simplified.
debian-lenny.packages
List of all Lenny packages required by Koha.
Mason James [Sun, 15 Mar 2009 05:52:35 +0000 (18:52 +1300)]
fixes error below...
bookcount.pl: Illegal Date 'Item has no branch transfers record' does not match 'iso' format: yyyy-mm-dd at /home/mason/git/kap-k3-2/circ/bookcount.pl line 88
Joe Atzberger [Thu, 19 Mar 2009 19:06:26 +0000 (14:06 -0500)]
Bug 2958 - notforloan (8008) is a numeric field.
Update index to allow searching for "On Order" items, -1 value.
Example:
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-search.pl?q=ccl=notforloan:-1
Without this patch, search for "-1" is normalized to "1".
Joe Atzberger [Wed, 18 Mar 2009 22:21:49 +0000 (17:21 -0500)]
Invalid field 'expiry' referenced.
This caused a warning from C4::Dates on every execution, since the value
passed to format_date was undefined. Now we reference the correct field
and check for a populated value before trying to reformat it.
Joshua Ferraro [Mon, 16 Feb 2009 16:42:36 +0000 (10:42 -0600)]
Second patch to address LL Bug 367 Titles without ISBNs display "no cover image available" while titles with ISBNS that don't match a Syndetics cover display nothing
Joe Atzberger [Tue, 10 Mar 2009 21:41:01 +0000 (16:41 -0500)]
Fixing catalogue_out errors.
This script ran against biblioitems.itemtype instead of items.itype.
With that corrected, biblioitems is not used by the query.
Report also failed to check whether the item was currently checked out
(i.e., in the issues table) before declaring it an inactive,
uncirculating item!
Joe Atzberger [Tue, 30 Dec 2008 19:50:15 +0000 (13:50 -0600)]
Libraries (branches) should be sorted by branchname.
The display sorted by code, resulting in nonsensical order
for the users, who don't know or see the codes. Note,
this data should come from GetBranchesLoop, when that
function is availabled (from a separate patch).
This patch only fix a "security" failure that permit a user to renew his loan using directly the opac-renew.pl url.
Now, we check that opacrenewalallowed is set to on to permit the renewal in opac.
Joe Atzberger [Tue, 13 Jan 2009 23:11:06 +0000 (17:11 -0600)]
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.
Galen Charlton [Fri, 6 Mar 2009 18:17:39 +0000 (12:17 -0600)]
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."
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.
Michael Hafen [Tue, 3 Feb 2009 23:46:25 +0000 (16:46 -0700)]
tweak Inventory tool and sub in C4/Items so call number min and max are not required
This changes the setting if default values in the inventory tool where
the min and max call number are concerned. Also changes how the query
is formed in C4/Items so that these two are not required.
Joe Atzberger [Mon, 29 Dec 2008 16:51:45 +0000 (10:51 -0600)]
Bug 2883 - longoverdue cronjob fails to implement required functionality.
This does not fix all problems recorded in 2883 (see all the FIXME's), but
it does improve the script's basic feedback to an intelligible level.
It also adjusts the documentation and examples to correct bogus usage
instructions.
Kohabug 2500 Fiction Call Number Splitting Enhancement/Bugfix
The current regexp used to split fiction call numbers does not handle the '.' char well. This patch corrects the regexp so that it behaves as expected.
Galen Charlton [Wed, 11 Feb 2009 23:01:01 +0000 (17:01 -0600)]
changes to OPAC results and detail XSLT
Various changes to OPAC search results and bib
detail display for MARC21.
* Search results
[1] 245 subfields will be displayed in order $a, $b, $h, then
rest of subfields in the order they appear in the record.
[2] New edition field from 250$a, displayed under author
[3] New other title field from 246$a$b, displayed under call number
* Bib details
[1] 245 subfields will be displayed in order $a, $b, $h, then
rest of subfields in the order they appear in the record.
[2] New edition field from 250$a$b, displayed under publisher
[3] New description field from 300$a$b$c$e$g, under the edition.
[4] New other title field from the 246$i$a$b$h$f$g$n$p, above the
uniform title field.
[6] All 6XX fields are displayed in the subjects field.
[7] '--' now separates subdivisions in subject headings.
Andrew Elwell [Sun, 22 Feb 2009 13:53:08 +0000 (14:53 +0100)]
Consistency check between Makefile.pl and about.pl We weren't picking up JSOM so admin/item_circulation_alerts.pl gave a 500 internal server error if JOSM not installed.
Also sorted packages.debian alphabetically so that we can maintain
easier.
John Beppu [Thu, 26 Feb 2009 19:19:28 +0000 (13:19 -0600)]
bug 1546 - REPLACE statements
A REPLACE statement in tools/letter.pl was indirectly corrupting data
in the message_transports table. It has been replaced with code that
does an UPDATE or INSERT depending on whether the row existed or not.
Also, to protect data in the message_transports table further, letters
which have entries in the message_transports table are no longer
deletable.
Michael Hafen [Tue, 24 Feb 2009 19:05:50 +0000 (12:05 -0700)]
Add option to inventory tool to ignore copies on loan
This adds an option to the inventory tool causing it to ignore copies
currently on loan. This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.
Galen Charlton [Tue, 10 Feb 2009 22:38:11 +0000 (16:38 -0600)]
reduce bib fetches during search and OPAC display
Speed up bib search and OPAC bib display, especially
when the XSLT OPAC results and details display sysprefs are
ON, by passing an existing MARC::Record object to three
functions:
These functions previously fetched the bib from the
database, incurring the cost of DB retrieval and MARCXML
parsing even though client code already had a
MARC::Record object available.
Joshua Ferraro [Wed, 4 Feb 2009 16:46:24 +0000 (10:46 -0600)]
Fixes to two issues with status display on OPAC:
1. rather than testing for notforloan == -1, test for any negative values to set the On order status
2. in cases where itemcallnumber is blank or null, don't display the itemcallnumber brackets []
Joshua Ferraro [Wed, 4 Feb 2009 16:46:23 +0000 (10:46 -0600)]
Distinguish between items marked 'not for loan' and 'Available'
This patch works with XSL* sysprefs == ON, a future patch will address XSL sysprefs==OFF
Items with notforloan set to a negative number still designate an 'ordered' status
Some items are marked 'not for loan' by setting that value at the item level, others by assigning
that value to that item's itemtype. This patch works for both scenarios.
Specific changes this patch introduces to the OPAC:
* Adds a new OPAC results page key 'Copies available for reference:'
* Changes 'Copies available at:' to 'Copies available for loan:'
* Changes the availability limit label in opac-advsearch from:
'Only items currently available' to 'Only items currently
available for loan or reference
* Displays the authorised value for the specific notforloan value in the OPAC detail page in
parentheses next to 'Not for Loan'
John Beppu [Tue, 3 Feb 2009 22:02:03 +0000 (16:02 -0600)]
New C4 Modules
* C4::Category
- patron categories as objects
- an all() method to return all the categories as a list
* C4::ItemType
- itemtypes as objects
- an all() method to return all the item types as a list
* C4::ItemCirculationAlertPreference
- wrapper around the item_circulation_alert_preference table
- create() and delete() methods for easy manipulation of the preferences
- I regret giving it such a long name.
- The item_type column should've been named itemtype to make it
more similar to pre-existing tables. Oh well.
(C4::Category and C4::ItemType were made so that I wouldn't have to
write SQL inside my CGI scripts.
Their main purpose is to provide an easy way to get a list of
patron categories and item types.
Do not be fooled by the amount of POD.
There's actually very little code in these modules.)
Joe Atzberger [Wed, 28 Jan 2009 19:25:48 +0000 (13:25 -0600)]
Cleanup and perltidy.
Add "use warnings", remove unused variables and unnecessary finish/disconnect
at the end. This script could be improved to run only on tables that need to
be altered instead of touching all of them. It should also probably contain
warnings to the effect that it does not rescue your DATA that was forced into
whatever encoding the table used previously.
Owen Leonard [Fri, 9 Jan 2009 02:03:53 +0000 (20:03 -0600)]
Related to earlier patch: adding body id to add flexibility to CSS customizations.
This patch adds a different id to opac-shelves, opac-suggestions, and opac-tags based on whether or not the user is logged in, allowing for changes to style based on logged-in status.