View | Details | Raw Unified | Return to bug 11515
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +2 lines)
Lines 1027-1033 Link Here
1027
                                    <span>Previous</span>
1027
                                    <span>Previous</span>
1028
                                [% END %]
1028
                                [% END %]
1029
                            </li>
1029
                            </li>
1030
                            <li class="back_results"><a href="opac-search.pl?[% busc |url %]" title="Back to the results search list">Back to results</a></li>
1030
                            [%# busc is already URI encoded %]
1031
                            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1031
                            <li class="right_results">
1032
                            <li class="right_results">
1032
                                [% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>
1033
                                [% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>
1033
                                [% ELSE %]
1034
                                [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (+1 lines)
Lines 1424-1429 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1424
        <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]<span>Browse results</span>[% END %]</div>
1424
        <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]<span>Browse results</span>[% END %]</div>
1425
        <ul class="pg_menu clearfix">
1425
        <ul class="pg_menu clearfix">
1426
            <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">&laquo; Previous</a>[% ELSE %]<span>Previous</span>[% END %]</li>
1426
            <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">&laquo; Previous</a>[% ELSE %]<span>Previous</span>[% END %]</li>
1427
            [%# busc ise already URI encoded %]
1427
            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1428
            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1428
            <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>[% ELSE %]<span>Next</span>[% END %]</li>
1429
            <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>[% ELSE %]<span>Next</span>[% END %]</li>
1429
        </ul>
1430
        </ul>
(-)a/opac/opac-detail.pl (-5 / +7 lines)
Lines 121-128 my $session = get_session($query->cookie("CGISESSID")); Link Here
121
my %paging = (previous => {}, next => {});
121
my %paging = (previous => {}, next => {});
122
if ($session->param('busc')) {
122
if ($session->param('busc')) {
123
    use C4::Search;
123
    use C4::Search;
124
    use URI::Escape;
124
125
125
    # Rebuild the string to store on session
126
    # Rebuild the string to store on session
127
    # param value is URI encoded and params separator is HTML encode (&amp;)
126
    sub rebuildBuscParam
128
    sub rebuildBuscParam
127
    {
129
    {
128
        my $arrParamsBusc = shift;
130
        my $arrParamsBusc = shift;
Lines 133-145 if ($session->param('busc')) { Link Here
133
            if ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|total|offset|offsetSearch|next|previous|count|expand|scan)/) {
135
            if ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|total|offset|offsetSearch|next|previous|count|expand|scan)/) {
134
                if (defined($arrParamsBusc->{$_})) {
136
                if (defined($arrParamsBusc->{$_})) {
135
                    $pasarParams .= '&amp;' if ($j);
137
                    $pasarParams .= '&amp;' if ($j);
136
                    $pasarParams .= $_ . '=' . $arrParamsBusc->{$_};
138
                    $pasarParams .= $_ . '=' . uri_escape( $arrParamsBusc->{$_} );
137
                    $j++;
139
                    $j++;
138
                }
140
                }
139
            } else {
141
            } else {
140
                for my $value (@{$arrParamsBusc->{$_}}) {
142
                for my $value (@{$arrParamsBusc->{$_}}) {
141
                    $pasarParams .= '&amp;' if ($j);
143
                    $pasarParams .= '&amp;' if ($j);
142
                    $pasarParams .= $_ . '=' . $value;
144
                    $pasarParams .= $_ . '=' . uri_escape($value);
143
                    $j++;
145
                    $j++;
144
                }
146
                }
145
            }
147
            }
Lines 201-212 if ($session->param('busc')) { Link Here
201
    for (@arrBusc) {
203
    for (@arrBusc) {
202
        ($key, $value) = split(/=/, $_, 2);
204
        ($key, $value) = split(/=/, $_, 2);
203
        if ($key =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|offset|offsetSearch|count|expand|scan)/) {
205
        if ($key =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|offset|offsetSearch|count|expand|scan)/) {
204
            $arrParamsBusc{$key} = $value;
206
            $arrParamsBusc{$key} = uri_unescape($value);
205
        } else {
207
        } else {
206
            unless (exists($arrParamsBusc{$key})) {
208
            unless (exists($arrParamsBusc{$key})) {
207
                $arrParamsBusc{$key} = [];
209
                $arrParamsBusc{$key} = [];
208
            }
210
            }
209
            push @{$arrParamsBusc{$key}}, $value;
211
            push @{$arrParamsBusc{$key}}, uri_unescape($value);
210
        }
212
        }
211
    }
213
    }
212
    my $searchAgain = 0;
214
    my $searchAgain = 0;
Lines 279-285 if ($session->param('busc')) { Link Here
279
    for (@arrBusc) {
281
    for (@arrBusc) {
280
        unless ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|count|offsetSearch)/) {
282
        unless ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|count|offsetSearch)/) {
281
            $buscParam .= '&amp;' unless ($j == 0);
283
            $buscParam .= '&amp;' unless ($j == 0);
282
            $buscParam .= $_;
284
            $buscParam .= $_; # string already URI encoded
283
            $j++;
285
            $j++;
284
        }
286
        }
285
    }
287
    }
(-)a/opac/opac-search.pl (-8 / +8 lines)
Lines 330-342 $tag = $params->{tag} if $params->{tag}; Link Here
330
330
331
331
332
# String with params with the search criteria for the paging in opac-detail
332
# String with params with the search criteria for the paging in opac-detail
333
# param value is URI encoded and params separator is HTML encode (&amp;)
333
my $pasarParams = '';
334
my $pasarParams = '';
334
my $j = 0;
335
my $j = 0;
335
for (keys %$params) {
336
for (keys %$params) {
336
    my @pasarParam = $cgi->param($_);
337
    my @pasarParam = $cgi->param($_);
337
    for my $paramValue(@pasarParam) {
338
    for my $paramValue(@pasarParam) {
338
        $pasarParams .= '&amp;' if ($j > 0);
339
        $pasarParams .= '&amp;' if ($j > 0);
339
        $pasarParams .= $_ . '=' . $paramValue;
340
        $pasarParams .= $_ . '=' . uri_escape($paramValue);
340
        $j++;
341
        $j++;
341
    }
342
    }
342
}
343
}
Lines 511-520 if ($tag) { Link Here
511
        ($error, $results_hashref, $facets) = C4::Search::pazGetRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$query_type,$scan);
512
        ($error, $results_hashref, $facets) = C4::Search::pazGetRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$query_type,$scan);
512
    };
513
    };
513
} else {
514
} else {
514
    $pasarParams .= '&amp;query=' . $query;
515
    $pasarParams .= '&amp;query=' . uri_escape($query);
515
    $pasarParams .= '&amp;count=' . $results_per_page;
516
    $pasarParams .= '&amp;count=' . uri_escape($results_per_page);
516
    $pasarParams .= '&amp;simple_query=' . $simple_query;
517
    $pasarParams .= '&amp;simple_query=' . uri_escape($simple_query);
517
    $pasarParams .= '&amp;query_type=' . $query_type if ($query_type);
518
    $pasarParams .= '&amp;query_type=' . uri_escape($query_type) if ($query_type);
518
    eval {
519
    eval {
519
        ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1);
520
        ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1);
520
    };
521
    };
Lines 675-686 for (my $i=0;$i<@servers;$i++) { Link Here
675
                my $j = 0;
676
                my $j = 0;
676
                foreach (@newresults) {
677
                foreach (@newresults) {
677
                    my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0;
678
                    my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0;
678
                    $pasarParams .= $bibnum . ',';
679
                    $pasarParams .= uri_escape($bibnum) . ',';
679
                    $j++;
680
                    $j++;
680
                    last if ($j == $results_per_page);
681
                    last if ($j == $results_per_page);
681
                }
682
                }
682
                chop $pasarParams if ($pasarParams =~ /,$/);
683
                chop $pasarParams if ($pasarParams =~ /,$/);
683
                $pasarParams .= '&amp;total=' . int($total) if ($pasarParams !~ /total=(?:[0-9]+)?/);
684
                $pasarParams .= '&amp;total=' . uri_escape( int($total) ) if ($pasarParams !~ /total=(?:[0-9]+)?/);
684
                if ($pasarParams) {
685
                if ($pasarParams) {
685
                    my $session = get_session($cgi->cookie("CGISESSID"));
686
                    my $session = get_session($cgi->cookie("CGISESSID"));
686
                    $session->param('busc' => $pasarParams);
687
                    $session->param('busc' => $pasarParams);
687
- 

Return to bug 11515