From 8a279079482d8feade90def6eaebd797dfcfc47c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 10 Apr 2014 13:46:34 -0400 Subject: [PATCH] Bug 11518: (follow-up) retrieve syspref value using DBIC Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- Koha/Schema/Result/Item.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 6a1e0d268b..fd50d1569f 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -624,11 +624,11 @@ __PACKAGE__->belongs_to( { biblioitemnumber => "biblioitemnumber" }, ); -use C4::Context; sub effective_itemtype { my ( $self ) = @_; - if ( C4::Context->preference('item-level_itypes') ) { + my $pref = $self->result_source->schema->resultset('Systempreference')->find('item-level_itypes'); + if ( $pref->value() ) { return $self->itype(); } else { return $self->biblioitem()->itemtype(); -- 2.39.5