Skip to content

Commit

Permalink
Prepend only string content before first occurrence of ';'
Browse files Browse the repository at this point in the history
  • Loading branch information
ammopt committed Jul 29, 2024
1 parent f124eba commit 93bfecf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Koha/Plugin/Com/PTFSEurope/HLISD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ sub harvest_libraries {
}
);

my $prepend = $library->{attributes}->{'document-supply'};
$prepend = substr( $prepend, 0, index( $prepend, ';' ) ) if ( index( $prepend, ';' ) != -1 );

if($koha_library){
$self->debug_msg(
sprintf(
Expand All @@ -182,7 +185,7 @@ sub harvest_libraries {
my $library = Koha::Library->new(
{
branchcode => $library->{id},
branchname => $library->{attributes}->{'document-supply'}
branchname => $prepend
. ' - ' . $library->{attributes}->{ $self->get_HLISD_library_field('branchname') },
branchaddress1 => $library->{attributes}->{$self->get_HLISD_library_field('branchaddress1')},
branchzip => $library->{attributes}->{$self->get_HLISD_library_field('branchzip')},
Expand Down

0 comments on commit 93bfecf

Please sign in to comment.