Jesse Weaver [Thu, 15 Jan 2009 21:26:13 +0000 (15:26 -0600)]
Add holds policies
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.
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.
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
This patch add the form for sending shelf by e-mail, and add a button in shelves that allow the user to send a shelf.
It's an approximate copy of the send basket feature.
The default syspref setting for intranetuserjs should be empty. At one
time, an unwanted value accidently got put in there. This removes the
syspref only if it equals the unwanted value.
Galen Charlton [Fri, 9 Jan 2009 18:16:43 +0000 (12:16 -0600)]
bug 2505: more warnings fixes in C4/Context.pm
* more portable way to determine uname for
crash messages
* C4::Context->userenv now returns undef instead
of 0 if no userenv has been set yet; returning
undef when necessary is almost always better
than returning a scalar when a hashref is
normally expected.
Joe Atzberger [Thu, 8 Jan 2009 03:47:36 +0000 (21:47 -0600)]
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.
Joe Atzberger [Wed, 7 Jan 2009 20:57:29 +0000 (14:57 -0600)]
GetAuthValCode calls were positioned inside the loop,
despite the same values being supplied each time. Then
the conditional assignments would repeat the same calls again!
That means execution was liable to query the DB at least once
and as many as four times per item. With a large number of items
this is an unnecessary burden. By moving the calls outside
the loop, we can guarantee that we never have to call the DB for
that info more than twice (once for lost, once for damaged).
Michael Hafen [Wed, 27 Aug 2008 22:46:57 +0000 (16:46 -0600)]
javascript redirect when selecting a patron on circulation.pl Patron Selection Screen
This adds a little javascript to the Patron Selection form input after searching for a patron to check out to.
On click it redirects to checking out to the clicked patron.
Owen Leonard [Tue, 21 Oct 2008 20:15:26 +0000 (15:15 -0500)]
Hiding SMS settings in OPAC if SMSSendDriver is not defined. Fixes Bug 2455, remove SMS column from patron messaging preferences if SMSSendDriver is not defined
Joe Atzberger [Fri, 19 Sep 2008 00:02:48 +0000 (19:02 -0500)]
Dates expanding to expose some time (HH:MM:SS) granularity.
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format. Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV. ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.
Joe Atzberger [Fri, 12 Dec 2008 21:28:01 +0000 (15:28 -0600)]
authorized_values cleanup
Moving towards being able to enable warnings. Use one dbh, and stop
redeclaring it in each conditional chunk. ($sth still need to be cleaned.)
Toggle in script removed (tmpl should use loop context var __odd__).
$sth->finish calls removed where unnecessary.
Owen Leonard [Wed, 31 Dec 2008 20:28:38 +0000 (14:28 -0600)]
Providing options for adding to order when existing record search has failed.
I've duplicated the "Add to Order" block on the search results page to display after a user has searched for an existing record to add to an order. This block is displayed whether or not results were found on the assumption that a non-empty result set may not contain the desired result. Changes to neworderbiblio.pl allow supplier name to appear in breadcrumb nav.
Owen Leonard [Tue, 4 Nov 2008 16:21:47 +0000 (10:21 -0600)]
Fix for Bug 2700, Keeping Data When Adding Multiple Items
When cloning the set of inputs, the new js
increments the IDs of each form field (to keep them unique) and automatically
selects the option that was selected in the cloned group.
Joe Atzberger [Wed, 3 Dec 2008 15:31:50 +0000 (09:31 -0600)]
Labels Cleanup (Part 2 of Many)
CalcNextLabelPos pulled out of each subblock.
Print of header and initial structure deferred until later to allow fatals_to_browser to
display any fatal errors encountered in data preparation. This does not fix Unicode "wide character" crashes.
Created subroutine for debug dump lines.
Comparisons corrected (numerical not string compare).
Note: this script is still insecure with NO AUTH CHECK.
Andrew Moore [Wed, 17 Dec 2008 22:28:04 +0000 (16:28 -0600)]
Bug 2505: adding warnings to C4/Biblio.pm
I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.
One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.
There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.
Joe Atzberger [Fri, 2 Jan 2009 20:35:03 +0000 (14:35 -0600)]
barcodedecode() did not always return barcode
This patch amends the function to return barcode, in particular when
filter is not defined. It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.
Non-DB-dependent test script included. Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T. This seems mistaken, but is not corrected here
to avoid any surprises.
Joe Atzberger [Wed, 3 Dec 2008 15:31:49 +0000 (09:31 -0600)]
Labels Cleanup (Part 1 of Many)
Consolidated error catching after evals.
Removed unnecessary $sth->finish calls and some unused variables.
Pulled query for itemtype mappings outside DrawSpineText and added
a class level caching variable to eliminate repeated queries for
*each piece of text* on *each label*! This was a major performance
downside.
Note: this does not fix Unicode problems, but it does add some notes
on unsuccessful attempted workaround using utf8::encode.
C4::Labels should likely be broken up to separate out the pieces that
do not touch the database (wrappers of PDF::Reuse) and those that are
CRUD API for table data.
this fix...
- enables the index-searching functionality
- adds date-ranges
- uses the numSearchResults syspref, not a hardcoded '20'
- rewrote old 2.2 page-num code, (didnt work for 3.x)
- some indent and whitepages tidys.
- unused 2.2 search-code removed.
The effect on the crontab example is to invalidate the lines being executed. The lines were apparently copied in from a cron source, not crontab, despite the header describing it NOT being an example for cron. It also runs longoverdue twice, instead of fines.pl.
(bug #2856) Activate the duplicate patrons detection and check birthdate only if one is set
This patch activate the check of unique member, it was checked but not shown, and the member was added even if a duplicate was
detected.
It improve the duplicate detection, to check the birthdate only if it was specified in the form.
And fix an url of "Yes" link(if the borrower added IS the duplicate detected).
Owen Leonard [Thu, 2 Oct 2008 20:19:55 +0000 (15:19 -0500)]
Improvements to offline circ report (linking to title and patron records), and moving English strings from the script into the template to allow translation.
Galen Charlton [Wed, 17 Dec 2008 20:09:27 +0000 (14:09 -0600)]
bug 2799: followup
Various fixes to meet coding standards, template
design, and basic functionality:
* (bug 2505) turned on warnings
* use correct loop names when populating
$template
* put all TMPL_FOO in HTML comments
* assign UseBranchTransferLimits to circulation tab
* change template to use "library" instead of "branch"
* use standard YUI scripting for toolbar buttons
* add new script to admin menu
Galen Charlton [Wed, 17 Dec 2008 15:53:39 +0000 (09:53 -0600)]
bug 2860: allow setting of a syspref value to '0'
Fixed invalid test for the existence of CGI parameter; if it
is possible that the value of a parameter can be 0, it is
not sufficient to test like this:
if ($input->param('foo')) { ...
since the test will fail for *any* value that evaluates
to Perl false.
Andrew Moore [Wed, 17 Dec 2008 14:39:17 +0000 (08:39 -0600)]
bug 2824: improving error messages from test suite errors
This patch adds two warning messages to places in the test suite that
may fail. I don't think it changes any functionality, but it sure makes
it easier to figure out what has gone wrong.