X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=patroncards%2Fcreate-pdf.pl;h=f063e9befa045a50e64eec558a5ccd043677ca93;hb=f098258e8cf2d616c6bbc35e44c6a1df47be8517;hp=5604f17fa0223a803e95a3564938e741ad0fb7bf;hpb=c165df96c0ace7064a01150dfdfffbcd10b64f5e;p=koha.git diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 5604f17fa0..f063e9befa 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -141,13 +141,13 @@ foreach my $item (@{$items}) { elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'creator_images') { my $dbh = C4::Context->dbh(); $dbh->{LongReadLen} = 1000000; # allows us to read approx 1MB - $image_data = $dbh->selectrow_hashref("SELECT imagefile FROM creator_images WHERE image_name = \'$$layout_xml{'images'}{$_}{'data_source'}{'image_name'}\'"); + $image_data = $dbh->selectrow_hashref("SELECT imagefile FROM creator_images WHERE image_name = \'$images->{$_}->{'data_source'}->[0]->{'image_name'}\'"); warn sprintf('Database returned the following error: %s.', $error) if $error; - warn sprintf('Image does not exists in db table %s.', $$layout_xml{'images'}{$_}{'data_source'}{'image_source'}) if !$image_data; + warn sprintf('Image does not exists in db table %s.', $images->{$_}->{'data_source'}->[0]->{'image_name'}) if !$image_data; next PROCESS_IMAGES if !$image_data; } else { - warn sprintf('No retrieval method for image source %s.', $$layout_xml{'images'}{$_}{'data_source'}{'image_source'}); + warn sprintf('No retrieval method for image source %s.', $images->{$_}->{'data_source'}->[0]->{'image_source'}); next PROCESS_IMAGES; } }