Bugzilla – Attachment 164676 Details for
Bug 36563
Item search does not search for multiple values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36563: Turn into array only if required
Bug-36563-Turn-into-array-only-if-required.patch (text/plain), 1.79 KB, created by
Pedro Amorim
on 2024-04-11 11:57:19 UTC
(
hide
)
Description:
Bug 36563: Turn into array only if required
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-04-11 11:57:19 UTC
Size:
1.79 KB
patch
obsolete
>From 5947b584effc1f246dfb62788334d6b127154698 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 11 Apr 2024 10:40:16 +0000 >Subject: [PATCH] Bug 36563: Turn into array only if required > >Test plan, apply first patch: >1- Visit item search: >http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl >2- Set "Home library" -> "is not" -> "Centerville". Notice you get items from Centerville. >3- Apply second patch, repeat step 2, notice you now don't get items from Centervile. > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index a840f7f1f3f..09ea328b6ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -480,10 +480,11 @@ > url: '/cgi-bin/koha/catalogue/itemsearch.pl', > data: function ( d ) { > for (i in params) { >- if (! d.hasOwnProperty(params[i].name) ) { >- d[params[i].name] = []; >+ if(d[params[i].name]){ >+ d[params[i].name] = [].concat(d[params[i].name], params[i].value); >+ }else{ >+ d[params[i].name] = params[i].value; > } >- d[params[i].name].push(params[i].value); > } > d.format = 'json'; > d.columns = JSON.stringify( d.columns ); >-- >2.30.2
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 36563
:
164595
|
164596
|
164673
|
164675
|
164676
|
164677
|
164756
|
164857
|
165141