Bugzilla – Attachment 78154 Details for
Bug 21206
C4::Items - Remove GetItem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21206: Remove GetItem
Bug-21206-Remove-GetItem.patch (text/plain), 2.32 KB, created by
Jonathan Druart
on 2018-08-24 19:03:53 UTC
(
hide
)
Description:
Bug 21206: Remove GetItem
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-24 19:03:53 UTC
Size:
2.32 KB
patch
obsolete
>From 2c9dcc4017d617cf5ae63745276d66bc5846230a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Aug 2018 12:52:28 -0300 >Subject: [PATCH] Bug 21206: Remove GetItem > >--- > C4/Items.pm | 42 ------------------------------------------ > 1 file changed, 42 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 8ce7aa4a0f..9857a0961b 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -55,7 +55,6 @@ BEGIN { > > # function exports > @EXPORT = qw( >- GetItem > AddItemFromMarc > AddItem > AddItemBatchFromMarc >@@ -112,12 +111,6 @@ indexed (e.g., by Zebra), but means that each item > modification transaction must keep the items table > and the MARC XML in sync at all times. > >-Consequently, all code that creates, modifies, or deletes >-item records B<must> use an appropriate function from >-C<C4::Items>. If no existing function is suitable, it is >-better to add one to C<C4::Items> than to use add >-one-off SQL statements to add or modify items. >- > The items table will be considered authoritative. In other > words, if there is ever a discrepancy between the items > table and the MARC XML, the items table should be considered >@@ -135,41 +128,6 @@ of C<C4::Items> > > =cut > >-=head2 GetItem >- >- $item = GetItem($itemnumber,$barcode,$serial); >- >-Return item information, for a given itemnumber or barcode. >-The return value is a hashref mapping item column >-names to values. If C<$serial> is true, include serial publication data. >- >-=cut >- >-sub GetItem { >- my ($itemnumber,$barcode, $serial) = @_; >- my $dbh = C4::Context->dbh; >- >- my $item; >- if ($itemnumber) { >- $item = Koha::Items->find( $itemnumber ); >- } else { >- $item = Koha::Items->find( { barcode => $barcode } ); >- } >- >- return unless ( $item ); >- >- my $data = $item->unblessed(); >- $data->{itype} = $item->effective_itemtype(); # set the correct itype >- >- if ($serial) { >- my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=?"); >- $ssth->execute( $data->{'itemnumber'} ); >- ( $data->{'serialseq'}, $data->{'publisheddate'} ) = $ssth->fetchrow_array(); >- } >- >- return $data; >-} # sub GetItem >- > =head2 CartToShelf > > CartToShelf($itemnumber); >-- >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 21206
:
77699
|
77700
|
77701
|
78080
|
78081
|
78082
|
78153
|
78154
|
78155
|
82831
|
82832
|
82833
|
82834
|
84006
|
84007
|
84008
|
84009
|
84010
|
84184
|
84185
|
84186
|
84187
|
84188
|
85163
|
85164
|
85165
|
85166
|
85167
|
85168