Bugzilla – Attachment 137979 Details for
Bug 27272
Move C4::Items::GetItemsInfo to Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27272: Remove GetItemsInfo from tags/list.pl
Bug-27272-Remove-GetItemsInfo-from-tagslistpl.patch (text/plain), 2.91 KB, created by
Jonathan Druart
on 2022-07-21 14:05:15 UTC
(
hide
)
Description:
Bug 27272: Remove GetItemsInfo from tags/list.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-07-21 14:05:15 UTC
Size:
2.91 KB
patch
obsolete
>From db821585dcb4605d0fc5840addbdd524de05aa52 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 Jun 2022 08:29:19 +0200 >Subject: [PATCH] Bug 27272: Remove GetItemsInfo from tags/list.pl > >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt | 5 +++-- > tags/list.pl | 8 +++++--- > 2 files changed, 8 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >index cc25b9f11d2..70904be1560 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE AuthorisedValues %] >+[% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( do_it ) %]Review[% ELSE %]Review tags[% END %] › Tags › Tools › Koha</title> >@@ -64,9 +65,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %]</p> > [% END %] > </td> >- <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %] >+ <td>[% IF ( title.items.count ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %] > <li> >- [% item.branchname | html %] >+ [% Branches.GetName(item.holdingbranch) | html %] > <span class="shelvingloc"> > [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] > </span> >diff --git a/tags/list.pl b/tags/list.pl >index ac2ccbc8b17..95531f2a75d 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::Items; >+ > 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({ biblionumber => $dat->{biblionumber} }); > $dat->{biblionumber} = $_->{biblionumber}; > $dat->{tag_id} = $_->{tag_id}; >- $dat->{items} = \@items; >+ $dat->{items} = $items; > $dat->{TagLoop} = get_tags( > { > biblionumber => $_->{biblionumber}, >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27272
:
128230
|
128231
|
135640
|
135641
|
135642
|
135643
|
135644
|
135645
|
135646
|
135647
|
135648
|
135649
|
135650
|
135651
|
135652
|
135653
|
135654
|
135655
|
135656
|
135657
|
135658
|
135659
|
137966
|
137967
|
137968
|
137969
|
137970
|
137971
|
137972
|
137973
|
137974
|
137975
|
137976
|
137977
|
137978
|
137979
|
137980
|
137981
|
137982
|
138109
|
138296
|
138297
|
138298
|
138303
|
138304
|
138305
|
138306
|
138307
|
138308
|
138437
|
138438
|
138439
|
138440
|
138441
|
138442
|
138553
|
138554
|
138555
|
138556
|
138557
|
138558
|
138559
|
138560
|
138561
|
138562
|
138563
|
138564
|
138565
|
138566
|
138567
|
138568
|
138569
|
138570
|
138571
|
138572
|
138573
|
138574
|
138575
|
138614
|
138615
|
138616
|
138617
|
138618
|
138619
|
138620
|
138621
|
138622
|
138623
|
138624
|
138625
|
138626
|
138627
|
138628
|
138629
|
138630
|
138631
|
138632
|
138633
|
138634
|
138635
|
138636
|
138714
|
138715
|
138716
|
138717
|
138718
|
138719
|
138720
|
138721
|
138722
|
138723
|
138724
|
138725
|
138726
|
138727
|
138728
|
138729
|
138730
|
138731
|
138732
|
138733
|
138734
|
138735
|
138736
|
138773
|
138774
|
138775
|
138776
|
138777
|
138778
|
138779
|
138780
|
138781
|
138782
|
138783
|
138784
|
138785
|
138786
|
138787
|
138788
|
138789
|
138790
|
138791
|
138792
|
138793
|
138794
|
138832
|
139928