Bugfix for 1725 request.pl erroring with a biblio that has no items

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Cormack 2008-01-01 15:56:22 -06:00 committed by Joshua Ferraro
parent 94036d8490
commit db37744333
2 changed files with 15 additions and 3 deletions

View File

@ -86,7 +86,11 @@ if (alreadyreserved > "0"){
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="noitems" -->
<p class="problem">
<strong>Sorry, this biblio has no items attached</strong>
</p>
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="messagetransfert" -->
<div>
<h2>Hold found for (<!-- TMPL_VAR NAME="nextreservtitle" -->), please transfer</h2>
@ -371,7 +375,7 @@ if (alreadyreserved > "0"){
</form>
<!-- /TMPL_IF -->
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
</div>
</div>

View File

@ -214,7 +214,15 @@ my $fixedRank = $count+1;
my @branchcodes;
my %itemnumbers_of_biblioitem;
my @itemnumbers = @{ get_itemnumbers_of($biblionumber)->{$biblionumber} };
my @itemnumbers;
if (my $items = get_itemnumbers_of($biblionumber)->{$biblionumber}){
@itemnumbers = @$items;
}
else {
$template->param('noitems' => 1);
}
my $iteminfos_of = GetItemInfosOf(@itemnumbers);
foreach my $itemnumber (@itemnumbers) {