Bugzilla – Attachment 40183 Details for
Bug 13540
Item's permanent_location is set to CART|PROC if an Item is edited when it's location is CART|PROC.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13540: Remove the too specific subroutine
Bug-13540-Remove-the-too-specific-subroutine.patch (text/plain), 1.74 KB, created by
Jonathan Druart
on 2015-06-16 13:51:41 UTC
(
hide
)
Description:
Bug 13540: Remove the too specific subroutine
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-06-16 13:51:41 UTC
Size:
1.74 KB
patch
obsolete
>From f32451fcb18e61f301e7bb7b0af0c26810a2a783 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@koha-community.org> >Date: Tue, 16 Jun 2015 15:50:21 +0200 >Subject: [PATCH] Bug 13540: Remove the too specific subroutine > >This patch replaces the too specific GetRealItemLocations subroutine >with a call to GetItem >--- > C4/Items.pm | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 3c3cff7..eab7ae7 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -959,22 +959,6 @@ sub GetItemLocation { > return \%itemlocation; > } > >-=head GetRealItemLocations >- >- my $locations = C4::Items::GetRealItemLocations($itemnumber); >- >-A convenience function of getting just the Item location and permanent_location >-@PARAM1, Long, the koha-items.itemnumber >-@RETURNS, Reference to Hash, with koha.items.location and permanent_location as hash keys. >- >-=cut >-sub GetRealItemLocations { >- my $itemnumber = shift; >- my $sth = C4::Context->dbh()->prepare('SELECT location, permanent_location FROM items WHERE itemnumber = ?'); >- $sth->execute($itemnumber); >- return $sth->fetchrow_hashref(); >-} >- > =head2 GetLostItems > > $items = GetLostItems( $where ); >@@ -2071,8 +2055,7 @@ sub _do_column_fixes_for_mod { > else { > #Preserve the old permanent_location in face of adversity! > #Don't let it fall to 'PROC' or 'CART'. Otherwise it will be forever lost! >- my $locations = GetRealItemLocations( $item->{itemnumber} ); >- $item->{'permanent_location'} = $locations->{'permanent_location'}; >+ $item->{'permanent_location'} = C4::Items::GetItem($item->{itemnumber})->{permanent_location}; > } > } > if (exists $item->{'timestamp'}) { >-- >2.1.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 13540
:
35038
|
35047
|
35055
|
35336
|
35337
|
35951
|
35952
|
35953
| 40183 |
40214
|
40878