KPAC - fix getit_results with short titles user/bshum/kpac-fix-getit-with-short-titles
authorBen Shum <bshum@biblio.org>
Wed, 21 Nov 2012 19:17:59 +0000 (14:17 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 21 Nov 2012 19:17:59 +0000 (14:17 -0500)
commit58dc9471652bfcc6f481b122a51a3940626692d5
tree9f10d10c420f8dd13e42e2f18062305dd039d8f5
parent25429d51619641bb12d68e1cd8f4116469aa0e37
KPAC - fix getit_results with short titles

When using the "Get it" options to either add an item to a list or place an
item on hold, one would get an internal server error whenever attemping this
on a bib record with a short title.

Turns out that the substr function that shortens the length of long titles
breaks when the title is 18 characters or less.

Add an IF check around the substr function to avoid this error.

Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/kpac/getit_results.tt2