[Koha-devel] Spaces in search parameters

Daniel Holth dholth at fastmail.fm
Tue Aug 27 19:05:03 CEST 2002


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:

<a href=search.pl?startfrom=<TMPL_VAR NAME="prevstartfrom">&<TMPL_LOOP
NAME=FORMINPUTS>

<TMPL_VAR NAME=name>=<TMPL_VAR NAME=value ESCAPE=URL> <!-- new -->

&</TMPL_LOOP>type=<TMPL_IF
NAME="opac">opac<TMPL_ELSE>intra</TMPL_IF>>Previous Records</a>

	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: </pipermail/koha-devel/attachments/20020827/6481bd93/attachment-0002.pgp>


More information about the Koha-devel mailing list