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 1055-1061 Link Here
1055
                                    <span>Previous</span>
1055
                                    <span>Previous</span>
1056
                                [% END %]
1056
                                [% END %]
1057
                            </li>
1057
                            </li>
1058
                            <li class="back_results"><a href="opac-search.pl?[% busc |url %]" title="Back to the results search list">Back to results</a></li>
1058
                            [%# busc is already URI encoded %]
1059
                            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1059
                            <li class="right_results">
1060
                            <li class="right_results">
1060
                                [% IF ( nextBiblionumber ) %]
1061
                                [% IF ( nextBiblionumber ) %]
1061
                                    <a href="opac-detail.pl?biblionumber=[% nextBiblionumber %][% IF ( query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>
1062
                                    <a href="opac-detail.pl?biblionumber=[% nextBiblionumber %][% IF ( query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (+1 lines)
Lines 1430-1435 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1430
                    <span>Previous</span>
1430
                    <span>Previous</span>
1431
                [% END %]
1431
                [% END %]
1432
            </li>
1432
            </li>
1433
            [%# busc ise already URI encoded %]
1433
            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1434
            <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
1434
            <li class="right_results">
1435
            <li class="right_results">
1435
                [% IF ( nextBiblionumber ) %]
1436
                [% IF ( nextBiblionumber ) %]
(-)a/opac/opac-detail.pl (-5 / +7 lines)
Lines 154-161 my $session = get_session($query->cookie("CGISESSID")); Link Here
154
my %paging = (previous => {}, next => {});
154
my %paging = (previous => {}, next => {});
155
if ($session->param('busc')) {
155
if ($session->param('busc')) {
156
    use C4::Search;
156
    use C4::Search;
157
    use URI::Escape;
157
158
158
    # Rebuild the string to store on session
159
    # Rebuild the string to store on session
160
    # param value is URI encoded and params separator is HTML encode (&amp;)
159
    sub rebuildBuscParam
161
    sub rebuildBuscParam
160
    {
162
    {
161
        my $arrParamsBusc = shift;
163
        my $arrParamsBusc = shift;
Lines 166-178 if ($session->param('busc')) { Link Here
166
            if ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|total|offset|offsetSearch|next|previous|count|expand|scan)/) {
168
            if ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|total|offset|offsetSearch|next|previous|count|expand|scan)/) {
167
                if (defined($arrParamsBusc->{$_})) {
169
                if (defined($arrParamsBusc->{$_})) {
168
                    $pasarParams .= '&amp;' if ($j);
170
                    $pasarParams .= '&amp;' if ($j);
169
                    $pasarParams .= $_ . '=' . $arrParamsBusc->{$_};
171
                    $pasarParams .= $_ . '=' . uri_escape( $arrParamsBusc->{$_} );
170
                    $j++;
172
                    $j++;
171
                }
173
                }
172
            } else {
174
            } else {
173
                for my $value (@{$arrParamsBusc->{$_}}) {
175
                for my $value (@{$arrParamsBusc->{$_}}) {
174
                    $pasarParams .= '&amp;' if ($j);
176
                    $pasarParams .= '&amp;' if ($j);
175
                    $pasarParams .= $_ . '=' . $value;
177
                    $pasarParams .= $_ . '=' . uri_escape($value);
176
                    $j++;
178
                    $j++;
177
                }
179
                }
178
            }
180
            }
Lines 234-245 if ($session->param('busc')) { Link Here
234
    for (@arrBusc) {
236
    for (@arrBusc) {
235
        ($key, $value) = split(/=/, $_, 2);
237
        ($key, $value) = split(/=/, $_, 2);
236
        if ($key =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|offset|offsetSearch|count|expand|scan)/) {
238
        if ($key =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|offset|offsetSearch|count|expand|scan)/) {
237
            $arrParamsBusc{$key} = $value;
239
            $arrParamsBusc{$key} = uri_unescape($value);
238
        } else {
240
        } else {
239
            unless (exists($arrParamsBusc{$key})) {
241
            unless (exists($arrParamsBusc{$key})) {
240
                $arrParamsBusc{$key} = [];
242
                $arrParamsBusc{$key} = [];
241
            }
243
            }
242
            push @{$arrParamsBusc{$key}}, $value;
244
            push @{$arrParamsBusc{$key}}, uri_unescape($value);
243
        }
245
        }
244
    }
246
    }
245
    my $searchAgain = 0;
247
    my $searchAgain = 0;
Lines 312-318 if ($session->param('busc')) { Link Here
312
    for (@arrBusc) {
314
    for (@arrBusc) {
313
        unless ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|count|offsetSearch)/) {
315
        unless ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|count|offsetSearch)/) {
314
            $buscParam .= '&amp;' unless ($j == 0);
316
            $buscParam .= '&amp;' unless ($j == 0);
315
            $buscParam .= $_;
317
            $buscParam .= $_; # string already URI encoded
316
            $j++;
318
            $j++;
317
        }
319
        }
318
    }
320
    }
(-)a/opac/opac-search.pl (-8 / +8 lines)
Lines 350-362 $tag = $params->{tag} if $params->{tag}; Link Here
350
350
351
351
352
# String with params with the search criteria for the paging in opac-detail
352
# String with params with the search criteria for the paging in opac-detail
353
# param value is URI encoded and params separator is HTML encode (&amp;)
353
my $pasarParams = '';
354
my $pasarParams = '';
354
my $j = 0;
355
my $j = 0;
355
for (keys %$params) {
356
for (keys %$params) {
356
    my @pasarParam = $cgi->param($_);
357
    my @pasarParam = $cgi->param($_);
357
    for my $paramValue(@pasarParam) {
358
    for my $paramValue(@pasarParam) {
358
        $pasarParams .= '&amp;' if ($j > 0);
359
        $pasarParams .= '&amp;' if ($j > 0);
359
        $pasarParams .= $_ . '=' . $paramValue;
360
        $pasarParams .= $_ . '=' . uri_escape($paramValue);
360
        $j++;
361
        $j++;
361
    }
362
    }
362
}
363
}
Lines 543-552 if ($tag) { Link Here
543
        ($error, $results_hashref, $facets) = C4::Search::pazGetRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$query_type,$scan);
544
        ($error, $results_hashref, $facets) = C4::Search::pazGetRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$query_type,$scan);
544
    };
545
    };
545
} else {
546
} else {
546
    $pasarParams .= '&amp;query=' . $query;
547
    $pasarParams .= '&amp;query=' . uri_escape($query);
547
    $pasarParams .= '&amp;count=' . $results_per_page;
548
    $pasarParams .= '&amp;count=' . uri_escape($results_per_page);
548
    $pasarParams .= '&amp;simple_query=' . $simple_query;
549
    $pasarParams .= '&amp;simple_query=' . uri_escape($simple_query);
549
    $pasarParams .= '&amp;query_type=' . $query_type if ($query_type);
550
    $pasarParams .= '&amp;query_type=' . uri_escape($query_type) if ($query_type);
550
    eval {
551
    eval {
551
        ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1);
552
        ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1);
552
    };
553
    };
Lines 698-709 for (my $i=0;$i<@servers;$i++) { Link Here
698
                my $j = 0;
699
                my $j = 0;
699
                foreach (@newresults) {
700
                foreach (@newresults) {
700
                    my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0;
701
                    my $bibnum = ($_->{biblionumber})?$_->{biblionumber}:0;
701
                    $pasarParams .= $bibnum . ',';
702
                    $pasarParams .= uri_escape($bibnum) . ',';
702
                    $j++;
703
                    $j++;
703
                    last if ($j == $results_per_page);
704
                    last if ($j == $results_per_page);
704
                }
705
                }
705
                chop $pasarParams if ($pasarParams =~ /,$/);
706
                chop $pasarParams if ($pasarParams =~ /,$/);
706
                $pasarParams .= '&amp;total=' . int($total) if ($pasarParams !~ /total=(?:[0-9]+)?/);
707
                $pasarParams .= '&amp;total=' . uri_escape( int($total) ) if ($pasarParams !~ /total=(?:[0-9]+)?/);
707
                if ($pasarParams) {
708
                if ($pasarParams) {
708
                    my $session = get_session($cgi->cookie("CGISESSID"));
709
                    my $session = get_session($cgi->cookie("CGISESSID"));
709
                    $session->param('busc' => $pasarParams);
710
                    $session->param('busc' => $pasarParams);
710
- 

Return to bug 11515