projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 6557 follow-up DBRev number
[koha_fer]
/
C4
/
Images.pm
diff --git
a/C4/Images.pm
b/C4/Images.pm
index
209cde0
..
8b17f1c
100644
(file)
--- a/
C4/Images.pm
+++ b/
C4/Images.pm
@@
-25,12
+25,12
@@
use 5.010;
use C4::Context;
use GD;
use C4::Context;
use GD;
-use vars qw($debug $VERSION @ISA @EXPORT);
+use vars qw($debug $
noimage $
VERSION @ISA @EXPORT);
BEGIN {
# set the version for version checking
BEGIN {
# set the version for version checking
- $VERSION = 3.0
3
;
+ $VERSION = 3.0
7.00.049
;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
@@
-40,6
+40,11
@@
BEGIN {
&DelImage
);
$debug = $ENV{KOHA_DEBUG} || $ENV{DEBUG} || 0;
&DelImage
);
$debug = $ENV{KOHA_DEBUG} || $ENV{DEBUG} || 0;
+
+ $noimage = pack( "H*",
+ '47494638396101000100800000FFFFFF'
+ . '00000021F90401000000002C00000000'
+ . '010001000002024401003B' );
}
=head2 PutImage
}
=head2 PutImage
@@
-101,13
+106,14
@@
sub RetrieveImage {
my $sth = $dbh->prepare($query);
$sth->execute($imagenumber);
my $imagedata = $sth->fetchrow_hashref;
my $sth = $dbh->prepare($query);
$sth->execute($imagenumber);
my $imagedata = $sth->fetchrow_hashref;
- if (
$sth->err
) {
-
warn "Database error!"
;
-
return undef
;
+ if (
!$imagedata
) {
+
$imagedata->{'thumbnail'} = $noimage
;
+
$imagedata->{'imagefile'} = $noimage
;
}
}
-
else
{
-
return $imagedata
;
+
if ( $sth->err )
{
+
warn "Database error!" if $debug
;
}
}
+ return $imagedata;
}
=head2 ListImagesForBiblio
}
=head2 ListImagesForBiblio
@@
-192,4
+198,17
@@
sub _scale_image {
}
}
}
}
+=head2 NoImage
+
+ C4::Images->NoImage;
+
+Returns the gif to be used when there is no image matching the request, and
+its mimetype (image/gif).
+
+=cut
+
+sub NoImage {
+ return $noimage, 'image/gif';
+}
+
1;
1;