Bugzilla – Attachment 81291 Details for
Bug 21650
C4::Items::GetLastAcquisitions has never been used and should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21650: Remove the subroutine C4::Items::GetLastAcquisitions
Bug-21650-Remove-the-subroutine-C4ItemsGetLastAcqu.patch (text/plain), 2.75 KB, created by
Katrin Fischer
on 2018-10-26 13:44:52 UTC
(
hide
)
Description:
Bug 21650: Remove the subroutine C4::Items::GetLastAcquisitions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-26 13:44:52 UTC
Size:
2.75 KB
patch
obsolete
>From 48fbc8879007881f76fd7739836c27c3150d35bf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 24 Oct 2018 15:31:02 -0300 >Subject: [PATCH] Bug 21650: Remove the subroutine > C4::Items::GetLastAcquisitions > >C4::Items::GetLastAcquisitions has been added by > commit 7753bbad4fb4df47c8fb4f959fc68764a71cb623 > Adding Some new functions > >(?) > >Apparently it has never been used, we should remove it to avoid unnecessary maintenance. > >Test plan: > git grep GetLastAcquisitions >must not return any results > >NOTE: POD Coverage test failure is expected on removal > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Items.pm | 52 ---------------------------------------------------- > 1 file changed, 52 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index f81e0ca1b8..cfcb118319 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -47,7 +47,6 @@ BEGIN { > ItemSafeToDelete > DelItemCheck > MoveItemFromBiblio >- GetLastAcquisitions > CartToShelf > ShelfToCart > GetAnalyticsCount >@@ -1177,57 +1176,6 @@ sub GetHostItemsInfo { > return @returnitemsInfo; > } > >-=head2 GetLastAcquisitions >- >- my $lastacq = GetLastAcquisitions({'branches' => ('branch1','branch2'), >- 'itemtypes' => ('BK','BD')}, 10); >- >-=cut >- >-sub GetLastAcquisitions { >- my ($data,$max) = @_; >- >- my $itemtype = C4::Context->preference('item-level_itypes') ? 'itype' : 'itemtype'; >- >- my $number_of_branches = @{$data->{branches}}; >- my $number_of_itemtypes = @{$data->{itemtypes}}; >- >- >- my @where = ('WHERE 1 '); >- $number_of_branches and push @where >- , 'AND holdingbranch IN (' >- , join(',', ('?') x $number_of_branches ) >- , ')' >- ; >- >- $number_of_itemtypes and push @where >- , "AND $itemtype IN (" >- , join(',', ('?') x $number_of_itemtypes ) >- , ')' >- ; >- >- my $query = "SELECT biblio.biblionumber as biblionumber, title, dateaccessioned >- FROM items RIGHT JOIN biblio ON (items.biblionumber=biblio.biblionumber) >- RIGHT JOIN biblioitems ON (items.biblioitemnumber=biblioitems.biblioitemnumber) >- @where >- GROUP BY biblio.biblionumber >- ORDER BY dateaccessioned DESC LIMIT $max"; >- >- my $dbh = C4::Context->dbh; >- my $sth = $dbh->prepare($query); >- >- $sth->execute((@{$data->{branches}}, @{$data->{itemtypes}})); >- >- my @results; >- while( my $row = $sth->fetchrow_hashref){ >- push @results, {date => $row->{dateaccessioned} >- , biblionumber => $row->{biblionumber} >- , title => $row->{title}}; >- } >- >- return @results; >-} >- > =head2 get_hostitemnumbers_of > > my @itemnumbers_of = get_hostitemnumbers_of($biblionumber); >-- >2.11.0
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 21650
:
81082
|
81083
| 81291 |
87398