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>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
<td nowrap="nowrap">
<a class="checkout_res_back" href="[% mkurl(ctx.kpac_root _ '/record/' _ ctx.bre_id, {}, kill_params) %]">
[% title = attrs.title || '';
- title = title.substr(18, title.length, '...');
+ IF title.length > 18; title = title.substr(18, title.length, '...'); END;
l('Back to [_1]', title);
%]
</a>