Bug 17843: Remove C4::Koha::getitemtypeinfo
At this point there should not be any calls to this subroutine. Signed-off-by: Lari Taskula <lari.taskula@jns.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This commit is contained in:
parent
091d6c513b
commit
a2be532dc2
40
C4/Koha.pm
40
C4/Koha.pm
|
|
@ -41,7 +41,6 @@ BEGIN {
|
|||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
&GetPrinters &GetPrinter
|
||||
&getitemtypeinfo
|
||||
&GetItemTypesCategorized
|
||||
&getallthemes
|
||||
&getFacets
|
||||
|
|
@ -121,45 +120,6 @@ sub GetItemTypesCategorized {
|
|||
return ($dbh->selectall_hashref($query,'itemtype'));
|
||||
}
|
||||
|
||||
=head2 getitemtypeinfo
|
||||
|
||||
$itemtype = &getitemtypeinfo($itemtype, [$interface]);
|
||||
|
||||
Returns information about an itemtype. The optional $interface argument
|
||||
sets which interface ('opac' or 'intranet') to return the imageurl for.
|
||||
Defaults to intranet.
|
||||
|
||||
=cut
|
||||
|
||||
sub getitemtypeinfo {
|
||||
my ($itemtype, $interface) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
require C4::Languages;
|
||||
my $language = C4::Languages::getlanguage();
|
||||
my $it = $dbh->selectrow_hashref(q|
|
||||
SELECT
|
||||
itemtypes.itemtype,
|
||||
itemtypes.description,
|
||||
itemtypes.rentalcharge,
|
||||
itemtypes.notforloan,
|
||||
itemtypes.imageurl,
|
||||
itemtypes.summary,
|
||||
itemtypes.checkinmsg,
|
||||
itemtypes.checkinmsgtype,
|
||||
itemtypes.sip_media_type,
|
||||
COALESCE( localization.translation, itemtypes.description ) AS translated_description
|
||||
FROM itemtypes
|
||||
LEFT JOIN localization ON itemtypes.itemtype = localization.code
|
||||
AND localization.entity = 'itemtypes'
|
||||
AND localization.lang = ?
|
||||
WHERE itemtypes.itemtype = ?
|
||||
|, undef, $language, $itemtype );
|
||||
|
||||
$it->{imageurl} = getitemtypeimagelocation( ( ( defined $interface && $interface eq 'opac' ) ? 'opac' : 'intranet' ), $it->{imageurl} );
|
||||
|
||||
return $it;
|
||||
}
|
||||
|
||||
=head2 getitemtypeimagedir
|
||||
|
||||
my $directory = getitemtypeimagedir( 'opac' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue