# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
use warnings;
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;
}
}