bugfix: do not crash when searching 'default' (all) heading types

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2007-11-12 17:13:47 -06:00 committed by Joshua Ferraro
parent 1c1e4663e1
commit 0e53c5539b
1 changed files with 3 additions and 2 deletions

View File

@ -653,7 +653,8 @@ sub GetAuthType {
my ($authtypecode) = @_;
my $dbh=C4::Context->dbh;
my $sth;
if ($authtypecode){
if (defined $authtypecode){ # NOTE - in MARC21 framework, '' is a valid authority
# type
$sth=$dbh->prepare("select * from auth_types where authtypecode=?");
$sth->execute($authtypecode);
} else {
@ -917,7 +918,7 @@ sub BuildSummary{
foreach my $field ($record->field('5..')) {
$altheading.= "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see also:</i> ".$field->as_string();
}
$summary .= ": ";
$summary .= ": " if $summary;
$summary.=$heading.$seeheading.$altheading;
}
}