Bugzilla – Attachment 2313 Details for
Bug 4290
search for author in repository
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-4290-search-for-author-in-repository.patch (text/plain), 1.27 KB, created by
Owen Leonard
on 2010-07-06 16:56:42 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-07-06 16:56:42 UTC
Size:
1.27 KB
patch
obsolete
>From 46468a87597fb84c127d0e0dbd8dcd31727d580c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 6 Jul 2010 12:52:29 -0400 >Subject: [PATCH] Fix for Bug 4290 - search for author in repository > >Reimplementation of Nahuel's patch from 2010-03-02 >--- > C4/Breeding.pm | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 2b73729..9003f9a 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -169,7 +169,7 @@ C<import_biblios> tables of the Koha database. > =cut > > sub BreedingSearch { >- my ($title,$isbn,$z3950random) = @_; >+ my ($search,$isbn,$z3950random) = @_; > my $dbh = C4::Context->dbh; > my $count = 0; > my ($query,@bind); >@@ -185,12 +185,13 @@ sub BreedingSearch { > $query .= "z3950random = ?"; > @bind=($z3950random); > } else { >+ $search =~ s/(\s+)/\%/g; > @bind=(); >- if ($title) { >- $query .= "title like ?"; >- push(@bind,"$title%"); >+ if ($search) { >+ $query .= "title like ? OR author like ?"; >+ push(@bind,"%$search%", "%$search%"); > } >- if ($title && $isbn) { >+ if ($search && $isbn) { > $query .= " and "; > } > if ($isbn) { >-- >1.7.0.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 4290
: 2313