From f67c71f4452d184693b59bfea43215fa100124b3 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 17 Aug 2011 17:18:54 -0400 Subject: [PATCH] TPAC: Strip the "page" GET param from author searches mkurl() generates a URL that, by default, retains all of the parameters that the currnt query string includes - useful for retaining library search scope, etc. However, searches for authors that are launched by clicking on the author's name in the search results page / record details were failing in many cases because the "page" parameter came along with it - and if there weren't five pages of results for page=5, for example, then no hits would be shown. This commit removes the page param from the URL. In other places, all of the params are stripped (see cnbrowse) but as I assume we want to retain search scope and potentially other parameters, we'll start with the smallest possible change. Signed-off-by: Dan Scott --- Open-ILS/web/templates/default/opac/parts/record/summary.tt2 | 2 +- Open-ILS/web/templates/default/opac/parts/result/table.tt2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 index 96d0988a40..f66c7bf0ac 100644 --- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 @@ -26,7 +26,7 @@ id='rdetail_author' href="[%- authorquery = attrs.author | replace('[,\.:;]', ''); - mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}) + mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page']) -%]">[% attrs.author | html %] [% END %] diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 index ce8562ece2..ad971153b7 100644 --- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 @@ -59,7 +59,7 @@ name='item_author' href="[%- authorquery = attrs.author | replace('[,\.:;]', ''); - mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}) + mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page']) -%]">[% attrs.author | html %]    [% attrs.pubdate | html %] -- 2.11.0