Bugzilla – Attachment 61153 Details for
Bug 18278
C4::Items - Remove GetItemLocation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18278: C4::Items - Remove GetItemLocation
Bug-18278-C4Items---Remove-GetItemLocation.patch (text/plain), 3.53 KB, created by
Marc Véron
on 2017-03-15 21:55:19 UTC
(
hide
)
Description:
Bug 18278: C4::Items - Remove GetItemLocation
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-03-15 21:55:19 UTC
Size:
3.53 KB
patch
obsolete
>From d4609f6ff326602efd4e9fbe34020c27acf9e4ad Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Mar 2017 17:14:56 -0300 >Subject: [PATCH] Bug 18278: C4::Items - Remove GetItemLocation >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This subroutine is no longer in used. >It was previously call from serials/serials-recieve.pl, which was not used and has been removed by > commit 65b7ad030cd5cd0e3148fbbd1496d31b5cf149f7 > Bug 13423: Remove unused serials-recieve > >Test plan: > git grep GetItemLocation > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Items.pm | 86 ------------------------------------------------------------- > 1 file changed, 86 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 55230c9..da3c372 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -67,7 +67,6 @@ BEGIN { > > CheckItemPreSave > >- GetItemLocation > GetLostItems > GetItemsForInventory > GetItemsCount >@@ -779,91 +778,6 @@ has copy-and-paste work. > > =cut > >-=head2 GetItemLocation >- >- $itemlochash = GetItemLocation($fwk); >- >-Returns a list of valid values for the >-C<items.location> field. >- >-NOTE: does B<not> return an individual item's >-location. >- >-where fwk stands for an optional framework code. >-Create a location selector with the following code >- >-=head3 in PERL SCRIPT >- >- my $itemlochash = getitemlocation; >- my @itemlocloop; >- foreach my $thisloc (keys %$itemlochash) { >- my $selected = 1 if $thisbranch eq $branch; >- my %row =(locval => $thisloc, >- selected => $selected, >- locname => $itemlochash->{$thisloc}, >- ); >- push @itemlocloop, \%row; >- } >- $template->param(itemlocationloop => \@itemlocloop); >- >-=head3 in TEMPLATE >- >- <select name="location"> >- <option value="">Default</option> >- <!-- TMPL_LOOP name="itemlocationloop" --> >- <option value="<!-- TMPL_VAR name="locval" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="locname" --></option> >- <!-- /TMPL_LOOP --> >- </select> >- >-=cut >- >-sub GetItemLocation { >- >- # returns a reference to a hash of references to location... >- my ($fwk) = @_; >- my %itemlocation; >- my $dbh = C4::Context->dbh; >- my $sth; >- $fwk = '' unless ($fwk); >- my ( $tag, $subfield ) = >- GetMarcFromKohaField( "items.location", $fwk ); >- if ( $tag and $subfield ) { >- my $sth = >- $dbh->prepare( >- "SELECT authorised_value >- FROM marc_subfield_structure >- WHERE tagfield=? >- AND tagsubfield=? >- AND frameworkcode=?" >- ); >- $sth->execute( $tag, $subfield, $fwk ); >- if ( my ($authorisedvaluecat) = $sth->fetchrow ) { >- my $authvalsth = >- $dbh->prepare( >- "SELECT authorised_value,lib >- FROM authorised_values >- WHERE category=? >- ORDER BY lib" >- ); >- $authvalsth->execute($authorisedvaluecat); >- while ( my ( $authorisedvalue, $lib ) = $authvalsth->fetchrow ) { >- $itemlocation{$authorisedvalue} = $lib; >- } >- return \%itemlocation; >- } >- else { >- >- #No authvalue list >- # build default >- } >- } >- >- #No authvalue list >- #build default >- $itemlocation{"1"} = "Not For Loan"; >- return \%itemlocation; >-} >- > =head2 GetLostItems > > $items = GetLostItems( $where ); >-- >2.1.4
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 18278
:
61131
|
61151
|
61153
|
61975
|
63916