The link that takes users to the advanced searc page now propagates
any existing (well, all) search URL params. The change required some
minor augmentation to the code that builds the advanced search form.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
queries = CGI.param('query');
bools = CGI.param('bool') || ['and' x 3];
qtypes = CGI.param('qtype') || ['keyword' x 3];
+
+ IF !qtypes.0; # not an array
+ qtypes = [qtypes];
+ bools = [bools];
+ queries = [queries];
+ END;
+
+ WHILE qtypes.size < 3;
+ qtypes.push('keyword');
+ bools.push('and');
+ queries.push('');
+ END;
+
FOR qtype IN qtypes;
c = contains.shift;
b = bools.shift;
<tr>
<td colspan="3">
<span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
- <a href="[% ctx.opac_root %]/advanced"
+ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]"
id="home_adv_search_link"><span
class="adv_search_font">[% l('Advanced Search') %]</span></a>
</td>