Commit Graph

476 Commits

Author SHA1 Message Date
Galen Charlton 7d1ac560bf 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>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:09 +02:00
Owen Leonard b7ad6f023a Partial fix for Bug 2655, "Items waiting on the hold shelf display as 'Available' in OPAC"
GetItemsInfo() returns a count_reserves variable which may be "Waiting" or "Reserved," but opac-detail.pl didn't include a check for these possibilities. This patch has opac-detail.tmpl output "On hold" in either case.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:08 +02:00
Owen Leonard 2426a2ae60 Fix for Bug 3095, Add to lists page doesn't redirect with no javascript
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:08 +02:00
Frédéric Demians 24c155aab9 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>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:06 +02:00
Owen Leonard eb124eb18d Corrected: Hiding renew link in the OPAC for items which cannot be renewed. Fixes bug 3083.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:05 +02:00
Galen Charlton c06766841c bug 3088: fix crash in opac-ISBDdetail.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:05 +02:00
Frederic Demians 642fad714a 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

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:05 +02:00
Joe Atzberger e09ec91679 whitespace cleanup and remove editor comments
No functionality affected.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:04 +02:00
Joe Atzberger 03903fea25 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.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:03 +02:00
Joe Atzberger d0370b1144 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>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:01 +02:00
Joe Atzberger 05ca641611 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).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:00 +02:00
Nahuel ANGELINETTI 172c38fcda (bug #2811)[3.2] fix opac-renew.pl part
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.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:59 +02:00
Galen Charlton aacefca565 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:

C4::Biblio::get_biblio_authorised_values()
C4::XSLT::XSLTParse4Display()
C4::XSLT::transformMARCXML4XSLT (internal)

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.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:57 +02:00
Galen Charlton fb4a431213 removing *.old files
Don't need to do this when modifying a script --
this is what Git is for.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:54 +02:00
Galen Charlton d658c36445 bug 2505: enable warnings for opac/sco/sco-main.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-26 21:14:53 +02:00
Galen Charlton 930316296b bug 2613: allow web self-check to accept patron ID
Use 'patronid' instead of 'userid' as the query parameter
for passing the patron userid or barcode around; 'userid'
is claimed by C4::Auth and should be used only for
authentication pages.

Fixes the problem where entering a patron's card
number would cause a redirect to the OPAC login
page.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-26 21:14:53 +02:00
Owen Leonard 4f156d005d Cleaning up Self-Checkout interface, adding some basic formatting based on other standard styles.
Patch also removes a hard-coded English string from the script and some unused functions from sco.js.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:14:53 +02:00
Galen Charlton bf03e06393 remove superfluous retrieval of $ENV{'REMOTE_USER'}
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-26 21:14:52 +02:00
Nahuel ANGELINETTI 4a27a63a25 (bug #1758) change the position of GetCOinSBiblio()
The last position getting the COinS of a record wasn't possible in all cases.
This patch just get the COinS earlier in the loop.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 11:35:16 +01:00
Nahuel Angelinetti 5b54716e19 add the possibility to replace, in sysprefs, the code by it's valuecode with {{code}} ex : {{995c}}
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 10:47:30 +01:00
Nahuel Angelinetti 65ebb57f1c Fix the language detection, to use the browser language if opac is translated, so show the news for the browser's language.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-05 18:36:13 +01:00
Nahuel ANGELINETTI 59bdcf6b28 (bug #2881) preselect default sorting
This patch just set a variable with the name of default sorting, and value 1
2009-03-05 15:10:22 +01:00
Nahuel ANGELINETTI 105a8ec64e (bug #3004) fix the opac authority search
This patch modify the way to transfer the different args, don't use the form arrays.
And use a GET form instead of POST(we are getting datas, sending nothing).
2009-03-05 10:45:06 +01:00
Nahuel ANGELINETTI 1241ffc5fd (bug #2998) fix search sorting containing "="
just modify the way to parse the actual args
2009-03-04 12:48:09 +01:00
Nahuel ANGELINETTI b22cda6be7 (bug #2913) show "--" on repeated fields
This patch just transform the script to set the field title as "--" if it was already shown.

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

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

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:46 +01:00
Nahuel ANGELINETTI e9bc18e850 (bug #2909) fix the attachment base64 encoding
this patch change the attachment encoding, else if the file is too large, koha throws an error.
This solution was found on koha list in a Joshua's e-mail

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

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

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:45 +01:00
Galen Charlton 7638e89e55 bug 2505: turn on warnings in two scripts 2008-12-12 14:53:07 +01:00
Danny Bouman 4b7fb10eef bug 2817: Added support to pull Amazon information based on UPC, EAN, and 13-digit ISBN
By adding support for UPC,EAN and 13-digit ISBN we are able to pull much more content from Amazon, especially on most music and dvd content which
does not have an ISBN.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:27:15 +01:00
Allen Reinmeyer 7506e30285 Bug 2675 users public lists do not show on opac-detail.pl
Code change actually occurs in opac-addbybiblionumber.pl accessed via opac-detail.pl.
Bug fix allows for users to select the 'save to lists' link and add item
to their private, public and all open lists.  Previously, only private
and open lists were retrieved and listed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:26:52 +01:00
Joe Atzberger 81c2c7a4b8 Minor logical cleanup.
The conditional assignment previously was:
    $norequests = 0 && $norequests if ....

The execution of "0" served no purpose.
Also consolidated RequestOnOpac logic to the one line that cared about it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2008-12-10 14:26:44 +01:00
Frederic Demians b360534fc0 Bug #2794: Browse Shelf doesn't work with ISBN containing '-'
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 18:00:44 +01:00
Ryan Higgins b65dbbf98d bug 1891 : bib-level itemtype was required in order to place a hold.
This patch removes some superfluous logic left over from early Koha
when a multi-step holds process allowed you to limit your choices to
specific biblioitems.itemtype values.  Code previously required a value
in biblioitems.itemtype in order to place hold.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-17 17:51:56 +01:00
Henri-Damien LAURENT c84ad27fbf Overhaul of cover images. Replaces Amazon's "no cover" image with styled text, addressing bug 2241. Adds the same "no cover" text for Google and Baker & Taylor images.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:52:26 +01:00
Allen Reinmeyer 17e956aeed Bug #2709 Cannot add from Search to New list
While a new list was created, no subsequent call to add the biblio number was made,
thus a new empty list would be created every time.
Under the existing list add, the same code to add items would also apply to a new list,
so I refactored out the logic to add items and made a new subroutine.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:12:01 +01:00
Owen Leonard 28861c99a0 Show card number (non-editable) on opac-userupdate.pl. Also correctly formatting expiration date.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:02:48 +01:00
Owen Leonard 14e7cff150 OPAC-side ISBN display fix (Bug 2592)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 15:02:00 +01:00
Galen Charlton d10e97bf00 bug 2659: fix crash in OAI-PMH interface
When retrieving a record via the OAI-PMH interface, if one of the fields used
to prepare the DC metadata is not defined in the MARC framework (e.g.,
biblioitems.publicationyear in the default MARC21 framework), an OAI GetRecord
can fail with the following error:

> Can't call method "as_string" on an undefined value at
> /usr/share/koha/opac/cgi-bin/opac/oai.pl line 59.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:50:50 +01:00
Galen Charlton 21d009766f bugfix: reenable listing suggestions by anyone
Change in parameter name in template not reflected
in script.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:50:39 +01:00
Henri-Damien LAURENT a70145f26a Displaying branchnames rather than branchcodes
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:50:00 +01:00
Galen Charlton a79b784f9c debugify a warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:49:37 +01:00
Owen Leonard 99f92cc8a5 Changes to prevent javascript errors in Internet Explorer
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:49:01 +01:00
Marc Chantreux 6b3cedff98 2663 fix
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-12 14:47:52 +01:00
Henri-Damien LAURENT 32796a847f fix for bug 1771: Template errors with remote itemtype image
This adds a new function, getitemtypeimagelocation, that returns the image
unmodified for absolute urls and returns the proper intranet or opac path
otherwise. It also updates all of the relevant files to use that function.

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

Conflicts:

	C4/Koha.pm
	catalogue/search.pl
	opac/opac-search.pl
2008-11-04 18:44:35 +01:00
Galen Charlton 6c168bf22b bug 2341: OPAC title-level holds permitted when items are on-order
Changed so that the presence of an on-order item (items.notforloan =- -1)
permits a title-level hold request to be made.  Prior to this patch,
if all of the items linked to the bib were on-order, no title-level
request was permitted.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:53:15 +01:00
Frederic Demians 57fcd4884e Bugfix #2630 2nd attempt
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:09:32 +01:00
Galen Charlton a04345b1d8 bug 2615: remove unneeded 'require Exporter'
Most Perl scripts (as opposed to modules) do
not need to require Exporter.

No user-visible or documentation changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:09:32 +01:00
Henri-Damien LAURENT aa9e3d0f7b bug fix 2590 :
seems that when itemtypeimagelocation returns undef, the hash is messed up.
put it at the end of the hash and everything is fine.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:09:29 +01:00
Jesse Weaver 8a740c7cbe fix number two for bug 1204: Lists of issues and overdues on opac-user.pl
This makes opac-user.pl sort the output from GetPendingIssues itself, by descend
ing due date.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-28 22:09:26 +01:00