Lines 2006-2026
sub searchResults {
Link Here
|
2006 |
} |
2006 |
} |
2007 |
foreach my $hostfield ( $marcrecord->field($analyticsfield)) { |
2007 |
foreach my $hostfield ( $marcrecord->field($analyticsfield)) { |
2008 |
my $hostbiblionumber = $hostfield->subfield("0"); |
2008 |
my $hostbiblionumber = $hostfield->subfield("0"); |
2009 |
my $linkeditemnumber = $hostfield->subfield("9"); |
2009 |
if ($hostbiblionumber) { |
2010 |
if(!$hostbiblionumber eq undef){ |
2010 |
my $linkeditemnumber = $hostfield->subfield("9"); |
2011 |
my $hostbiblio = GetMarcBiblio({ |
2011 |
my $linkeditemmarc = C4::Items::GetMarcItem( $hostbiblionumber, $linkeditemnumber ); |
2012 |
biblionumber => $hostbiblionumber, |
2012 |
if ($linkeditemmarc) { |
2013 |
embed_items => 1 }); |
2013 |
my $linkeditemfield = $linkeditemmarc->field($itemtag); |
2014 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) ); |
2014 |
if ($linkeditemfield) { |
2015 |
if(!$hostbiblio eq undef){ |
2015 |
push( @fields, $linkeditemfield ); |
2016 |
my @hostitems = $hostbiblio->field($itemfield); |
|
|
2017 |
foreach my $hostitem (@hostitems){ |
2018 |
if ($hostitem->subfield("9") eq $linkeditemnumber){ |
2019 |
my $linkeditem =$hostitem; |
2020 |
# append linked items if they exist |
2021 |
if (!$linkeditem eq undef){ |
2022 |
push (@fields, $linkeditem);} |
2023 |
} |
2024 |
} |
2016 |
} |
2025 |
} |
2017 |
} |
2026 |
} |
2018 |
} |
2027 |
- |
|
|