X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=tags%2Flist.pl;h=e92b3b207bbba877e1fdb3839c4f9ddf34381c13;hb=0890413d278af984c727acb157b02aeff36f015e;hp=ac2ccbc8b173982468a7ee7e4701e0f3c8755aea;hpb=9d6d641d1f8b77271800f43bc027b651f9aea52b;p=koha-ffzg.git diff --git a/tags/list.pl b/tags/list.pl index ac2ccbc8b1..e92b3b207b 100755 --- a/tags/list.pl +++ b/tags/list.pl @@ -23,10 +23,11 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Biblio qw( GetBiblioData ); use C4::Context; -use C4::Items qw( GetItemsInfo ); use C4::Tags qw( get_tag_rows get_tags remove_tag ); use C4::Output qw( output_html_with_http_headers ); +use Koha::Biblios; + my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. @@ -57,11 +58,12 @@ else { if ($tag) { my $taglist = get_tag_rows( { term => $tag } ); for ( @{$taglist} ) { + # FIXME We should use Koha::Biblio here my $dat = &GetBiblioData( $_->{biblionumber} ); - my @items = GetItemsInfo( $_->{biblionumber} ); + my $items = Koha::Items->search_ordered({ 'me.biblionumber' => $dat->{biblionumber} }); $dat->{biblionumber} = $_->{biblionumber}; $dat->{tag_id} = $_->{tag_id}; - $dat->{items} = \@items; + $dat->{items} = $items; $dat->{TagLoop} = get_tags( { biblionumber => $_->{biblionumber},