Bugzilla – Attachment 54848 Details for
Bug 17193
C4::Search::SearchAcquisitions is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17193: Remove C4::Search::SearchAcquisitions
Bug-17193-Remove-C4SearchSearchAcquisitions.patch (text/plain), 3.43 KB, created by
Jonathan Druart
on 2016-08-25 09:42:45 UTC
(
hide
)
Description:
Bug 17193: Remove C4::Search::SearchAcquisitions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-25 09:42:45 UTC
Size:
3.43 KB
patch
obsolete
>From 77bdbf736a93f9f90dea8e11390df30dc425ed24 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 25 Aug 2016 10:41:52 +0100 >Subject: [PATCH] Bug 17193: Remove C4::Search::SearchAcquisitions > >This subroutine is not used and can be removed > >Test plan: > git grep SearchAcquisitions >should not return any results. >--- > C4/Search.pm | 89 ------------------------------------------------------------ > 1 file changed, 89 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index d9a193c..96a8ae1 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2285,95 +2285,6 @@ sub searchResults { > return @newresults; > } > >-=head2 SearchAcquisitions >- Search for acquisitions >-=cut >- >-sub SearchAcquisitions{ >- my ($datebegin, $dateend, $itemtypes,$criteria, $orderby) = @_; >- >- my $dbh=C4::Context->dbh; >- # Variable initialization >- my $str=qq| >- SELECT marcxml >- FROM biblio >- LEFT JOIN biblioitems ON biblioitems.biblionumber=biblio.biblionumber >- LEFT JOIN items ON items.biblionumber=biblio.biblionumber >- WHERE dateaccessioned BETWEEN ? AND ? >- |; >- >- my (@params,@loopcriteria); >- >- push @params, $datebegin->output("iso"); >- push @params, $dateend->output("iso"); >- >- if (scalar(@$itemtypes)>0 and $criteria ne "itemtype" ){ >- if(C4::Context->preference("item-level_itypes")){ >- $str .= "AND items.itype IN (?".( ',?' x scalar @$itemtypes - 1 ).") "; >- }else{ >- $str .= "AND biblioitems.itemtype IN (?".( ',?' x scalar @$itemtypes - 1 ).") "; >- } >- push @params, @$itemtypes; >- } >- >- if ($criteria =~/itemtype/){ >- if(C4::Context->preference("item-level_itypes")){ >- $str .= "AND items.itype=? "; >- }else{ >- $str .= "AND biblioitems.itemtype=? "; >- } >- >- if(scalar(@$itemtypes) == 0){ >- my $itypes = GetItemTypes(); >- for my $key (keys %$itypes){ >- push @$itemtypes, $key; >- } >- } >- >- @loopcriteria= @$itemtypes; >- }elsif ($criteria=~/itemcallnumber/){ >- $str .= "AND (items.itemcallnumber LIKE CONCAT(?,'%') >- OR items.itemcallnumber is NULL >- OR items.itemcallnumber = '')"; >- >- @loopcriteria = ("AA".."ZZ", "") unless (scalar(@loopcriteria)>0); >- }else { >- $str .= "AND biblio.title LIKE CONCAT(?,'%') "; >- @loopcriteria = ("A".."z") unless (scalar(@loopcriteria)>0); >- } >- >- if ($orderby =~ /date_desc/){ >- $str.=" ORDER BY dateaccessioned DESC"; >- } else { >- $str.=" ORDER BY title"; >- } >- >- my $qdataacquisitions=$dbh->prepare($str); >- >- my @loopacquisitions; >- foreach my $value(@loopcriteria){ >- push @params,$value; >- my %cell; >- $cell{"title"}=$value; >- $cell{"titlecode"}=$value; >- >- eval{$qdataacquisitions->execute(@params);}; >- >- if ($@){ warn "recentacquisitions Error :$@";} >- else { >- my @loopdata; >- while (my $data=$qdataacquisitions->fetchrow_hashref){ >- push @loopdata, {"summary"=>GetBiblioSummary( $data->{'marcxml'} ) }; >- } >- $cell{"loopdata"}=\@loopdata; >- } >- push @loopacquisitions,\%cell if (scalar(@{$cell{loopdata}})>0); >- pop @params; >- } >- $qdataacquisitions->finish; >- return \@loopacquisitions; >-} >- > =head2 enabled_staff_search_views > > %hash = enabled_staff_search_views() >-- >2.8.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 17193
:
54848
|
54853
|
54962