Bug 3173 Place Hold link visible in OPAC even if syspref turned off
If the syspref RequestOnOpac is turned off, the link to place a hold does not
show in the detail page. However, the link is still present in the results
list as well as in the basket and in lists. Modified templates to check
for the syspref and to obey it.
NOTE: This does not turn off the display of the Holds tab in the OPAC
user account. I think there are situations where library staff may be
allowed to place holds but users are not allowed to do so through the
OPAC. Leaving the Holds tab visible shows users what they have on hold,
but does not allow them to place holds. It does allow users to cancel
holds. If there is a need to hide this tab, that would probably be
best accomplished by a separate syspref.
Joe Atzberger [Tue, 28 Jul 2009 01:47:50 +0000 (20:47 -0500)]
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.
Joe Atzberger [Wed, 22 Jul 2009 14:08:38 +0000 (09:08 -0500)]
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.
- my @subf = $field->subfields;
- (defined @subf) or @subf = ();
is not equivalent to
+ my @subf = $field->subfields || ();
as, the results of $field->subields is interpeted in scalar
context, not list context, resutling in @subf containing
the number of subfields, not the subfield data itself, which
engenders the error
Can't use string ("1") as an ARRAY ref while "strict refs" in use
later on. Changing the operator to 'or' instead of '||'
fixes this.
Joe Atzberger [Wed, 8 Jul 2009 21:52:18 +0000 (16:52 -0500)]
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.
Joe Atzberger [Thu, 2 Jul 2009 03:47:35 +0000 (22:47 -0500)]
Bug 2539. Remove unintegrated "spsuggest" code from search scripts.
The intent of kohaspsuggest is very confused. It wanted to simultaneously
log every search query, and get spelling suggestions from a totally different
database_host:db_user:db_password:database. The implementation seems
never have really made it into 3.0, however, since the only trace of the
tables it wants to query are in misc/migration_tools/22_to_30/phrase_log.sql
The job misc/spellcheck_suggest/make_spellcheck_suggest.pl does not even
target the same remote DB as the syspref tells the search code to do. Instead, it hits the
local DB and, not finding the tables that have no way of existing in a 3.0
install, it CREATES its own tables spontaneously, using MyISAM storage, no less.
This script should be drastically overhauled, or more likely just removed.
Other fixes:
Commented out unconditional warn!
Also reduced bizarre whitespace amounts in catalogue/search.pl and
fixed warning as recommended by perl -wc:
Scalar value @newresults[0] better written as $newresults[0]
John Beppu [Thu, 9 Jul 2009 01:09:00 +0000 (20:09 -0500)]
Minor Fixes for jQuery 1.3.2 Upgrade
I looked through all the relevant Javascript on this site
to find spots that would break in the upgrade from jQuery 1.2
to jQuery 1.3, and I fixed them.
Signed-off-by: John Beppu <john.beppu@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
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.
(bug #3284) fix borrower deletion in independantbranches mode
This patch fix the checks deleting a borrower in independantbranches mode.
Now, we check the user and the librarian are from the same branch, else we deny the deletion(and disable the link to delete).
Joe Atzberger [Thu, 18 Jun 2009 16:31:33 +0000 (11:31 -0500)]
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.
Galen Charlton [Wed, 17 Jun 2009 13:00:57 +0000 (08:00 -0500)]
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.
Jane Wagner [Tue, 16 Jun 2009 16:28:06 +0000 (12:28 -0400)]
Revision to my earlier patch for displaying the user name on checked-out items
My earlier patch (using the new syspref OPACShowCheckoutName mistakenly
displayed the Koha borrower number instead of the patron barcode number
in the OPAC display; this revises the script/template to use barcode.
Galen Charlton [Wed, 27 May 2009 18:10:42 +0000 (13:10 -0500)]
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.
Ryan Higgins [Wed, 27 May 2009 15:31:47 +0000 (10:31 -0500)]
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
Joe Atzberger [Tue, 26 May 2009 21:41:03 +0000 (16:41 -0500)]
Cleanup waitingreserves.pl and .tmpl
Use warnings and provide fallback values to avoid them.
Move waitingdate check up to top of loop.
Move $today creation outside loop (should be same for all).
Remove unused and unnecessary variables.
Add subtitle escaping to .tmpl and slightly standardize formatting.
Galen Charlton [Tue, 26 May 2009 19:20:03 +0000 (14:20 -0500)]
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
Joe Atzberger [Fri, 22 May 2009 21:45:51 +0000 (16:45 -0500)]
Cleanup view_holdsqueue.pl and .tmpl (minor)
Convert to GetBranchesLoop.
Insert template message to display for ALL libraries search, so that the
message is n0t truncated like "X items found for".
Joe Atzberger [Thu, 14 May 2009 20:28:40 +0000 (15:28 -0500)]
@renew_failed can cause enormous performance-killing array.
The array was populated and values flagged with an accessor, like:
for (@failedrenews) { $renew_failed[$_] = 1; }
But this means that an array of possibly hundreds of thousands of elements
would have to be auto-populated for high itemnumbers. A hash is the correct
structure. We also haven't checked the user input for validity, so we do not know
for sure that @failedrenews really does contain just itemnumbers.
Chris Catalfo [Tue, 12 May 2009 00:35:13 +0000 (00:35 +0000)]
Bug 1907 partial fix: prevent warnings on undefined params.
This patch adds default blank values for a couple of params the script might receive which were producing warns in the error log. Also wraps GetMarcBiblio in an eval.
Joe Atzberger [Mon, 11 May 2009 21:44:29 +0000 (16:44 -0500)]
Script to check for corruption of marcxml, and optionally to attempt fix.
When marcxml cannot be parsed into a MARC::Record object, the biblio is
undisplayable and it obviously breaks many features in Koha. This script
can test to parse every marcxml, and alert on failures. Optionally, the
marcxml can be replaced from the marc field.
Note that as a result of this patch, not only will the
page use valid XHTML, but the intranet stylesheets are
now used, IMO improving the display of the form.
This patch also fixes the descriptions of the Leader/09
and Leader/17.
Galen Charlton [Fri, 8 May 2009 20:10:13 +0000 (15:10 -0500)]
bug 3209: add 'p' (mixed materials) to MARC21 Leader/06 dropdown
Also made the following updates to the MARC21 leader plugin
[1] Changed description of Leader/08 to 'Type of control'
[2] Fixed typo in description value for 'z' in Leader/17
[3] Updated Leader/19, which is now 'Multipart resource record level'
Galen Charlton [Fri, 8 May 2009 22:31:14 +0000 (17:31 -0500)]
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:
(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.
This patch, fix the unimarc 700-4 plugin, adding the plugin_parameters() function.
And add an eval, that permit to have error in plugin, but don't die the editor.
This patch add the use of CircControl and HomeOrHoldingBranch for return and transfert rules.
* ItemHomeLibrary goes to item{HomeOrHoldingBranch}
* PatronLibrary goes to the borrower library
* PickupLibrary depends where the items was checked out, and the actual library.
This add a little improvment that does not re-request each time the circcontrol syspref.
Allow autotruncation to be set on its own
This simply reprocess operands in order to add * at lefthandside
It is a problem with non LTR scripts. But works fine with all the latin scripts
(bug #3553) do not allow users to create code-less frameworks
This patch, disallow the users to create frameworks without frameworkcode.
It adds some javascripts checks, and some perls checks(for non-javascript users).
This fix the user ability to cancel holds in OPAC.
At the moment, a user can cancel all his holds, but in fact, only items that are not in transfert or waiting to be checked out can be cancelled by the user.
The values are not escaped in javascript, so if there is double quotes, the authority cannot be imported because of javascript error. This patch fix this.