From dholth@fastmail.fm Tue Aug 27 19:04:48 2002 From: Daniel Holth To: koha-devel@lists.koha-community.org Subject: [Koha-devel] Spaces in search parameters Date: Tue, 27 Aug 2002 19:05:03 +0000 Message-ID: <1030500284.3774.8.camel@redfish> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3645393083283780670==" --===============3645393083283780670== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Kohaites, It's my bug so here's my solution: I have edited search.pl to read like this: ($keyword) && (push @$forminputs, { line => "keyword=$keyword", name => "keyword", value => "$keyword"} And it goes. Each parameter in the form has a name and value, instead of being lumped together in one string. Now, the search results template is modified to look something like this but without whitespace: & = &type=opacintra>Previous Records And the nice HTML::Template module URL-escapes the value of the variable. At first I tried just URLescaping the whole thing (line) but that turns the equals sign into a percent-code. I have not yet succeeded in replacing all the necessary pieces of search-results.tmpl but I can now browse my whole collection by searching for a ' ' (space). - Daniel Holth --===============3645393083283780670== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjEuMC42IChHTlUv TGludXgpCkNvbW1lbnQ6IEZvciBpbmZvIHNlZSBodHRwOi8vd3d3LmdudXBnLm9yZwoKaUQ4REJR QTliQys2VUJFTlp6QTBmUG9SQWtSR0FKNHVBck5RZkZmbVI4SExTQ2tLTXdraGxBWkNjd0NlTm1U awpVSXE2Z3NPTGxOU0lEK2JTT1hNOFB0MD0KPUpWRHEKLS0tLS1FTkQgUEdQIFNJR05BVFVSRS0t LS0tCg== --===============3645393083283780670==-- From chris@katipo.co.nz Tue Aug 27 19:12:25 2002 From: Chris Cormack To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] Spaces in search parameters Date: Tue, 27 Aug 2002 19:13:02 +0000 Message-ID: <20020828021218.GU16495@katipo.co.nz> In-Reply-To: <1030500284.3774.8.camel@redfish> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6272566447582231523==" --===============6272566447582231523== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Tue, Aug 27, 2002 at 10:04:42PM -0400, Daniel Holth said: > Kohaites, > > It's my bug so here's my solution: > Hi Daniel That looks to be a nice elegant solution. For HLT tho, we'd have to disable the search by space (browse option). Since it will cause a huge search, this made me think, we might need to add some parameters to the system preferences table to control how searches work? What do people think? Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz --===============6272566447582231523==--