Bug 11518: (follow-up) retrieve syspref value using DBIC
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
c3c7105fe7
commit
8a27907948
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue