From a30ab5e861c618175f31ff405d9efa1759446957 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 29 Mar 2022 10:54:49 +0200 Subject: [PATCH] Bug 24975: Fix bugs --- Koha/I18N.pm | 6 +++--- Koha/ItemType.pm | 2 +- admin/itemtypes.pl | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Koha/I18N.pm b/Koha/I18N.pm index ac56b44da04..1de5b606018 100644 --- a/Koha/I18N.pm +++ b/Koha/I18N.pm @@ -254,11 +254,11 @@ sub db_t { my @targets = $rs->search( { 'group' => $group, - 'l10n_target.language' => $language, + 'l10n_targets.language' => $language, }, { - join => 'l10n_target', - prefetch => 'l10n_target', + join => 'l10n_targets', + prefetch => 'l10n_targets', result_class => 'DBIx::Class::ResultClass::HashRefInflator', }, ); diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm index 9e66529671b..705a2a7cd2a 100644 --- a/Koha/ItemType.pm +++ b/Koha/ItemType.pm @@ -46,7 +46,7 @@ Returns a localized string for the Koha::ItemType description field. sub translated_description { my ( $self ) = @_; - return dt_t('itemtype', $self->translation_key); + return db_t('itemtype', $self->translation_key); } =head3 translation_key diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 6063348b9e5..2fc4b067c22 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -66,7 +66,6 @@ if ( $op eq 'add_form' ) { is_a_parent => $itemtype ? Koha::ItemTypes->search({parent_type=>$itemtype_code})->count : 0, imagesets => $imagesets, searchcategory => $searchcategory, - branches_loop => \@branches_loop, ); } elsif ( $op eq 'add_validate' ) { my $is_a_modif = $input->param('is_a_modif'); -- 2.25.1