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

(-)a/C4/Search.pm (-12 / +13 lines)
Lines 518-523 sub getRecords { Link Here
518
                                next;
518
                                next;
519
                            }
519
                            }
520
520
521
                            SetUTF8Flag($marc_record);
522
521
                            my @used_datas = ();
523
                            my @used_datas = ();
522
524
523
                            foreach my $tag ( @{ $facet->{tags} } ) {
525
                            foreach my $tag ( @{ $facet->{tags} } ) {
Lines 1305-1321 sub buildQuery { Link Here
1305
        if ( @limits ) {
1307
        if ( @limits ) {
1306
            $q .= ' and '.join(' and ', @limits);
1308
            $q .= ' and '.join(' and ', @limits);
1307
        }
1309
        }
1308
        return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $q, '', '', '', '', 'ccl' );
1310
        return ( undef, $q, $q, "q=ccl=".$q, $q, '', '', '', '', 'ccl' );
1309
    }
1311
    }
1310
    if ( $query =~ /^cql=/ ) {
1312
    if ( $query =~ /^cql=/ ) {
1311
        return ( undef, $', $', "q=cql=".uri_escape_utf8($'), $', '', '', '', '', 'cql' );
1313
        return ( undef, $', $', "q=cql=".$', $', '', '', '', '', 'cql' );
1312
    }
1314
    }
1313
    if ( $query =~ /^pqf=/ ) {
1315
    if ( $query =~ /^pqf=/ ) {
1314
        if ($query_desc) {
1316
        if ($query_desc) {
1315
            $query_cgi = "q=".uri_escape_utf8($query_desc);
1317
            $query_cgi = "q=".$query_desc;
1316
        } else {
1318
        } else {
1317
            $query_desc = $';
1319
            $query_desc = $';
1318
            $query_cgi = "q=pqf=".uri_escape_utf8($');
1320
            $query_cgi = "q=pqf=".$';
1319
        }
1321
        }
1320
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1322
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1321
    }
1323
    }
Lines 1487-1495 sub buildQuery { Link Here
1487
                        $query     .= " $operators[$i-1] ";
1489
                        $query     .= " $operators[$i-1] ";
1488
                        $query     .= " $index_plus " unless $indexes_set;
1490
                        $query     .= " $index_plus " unless $indexes_set;
1489
                        $query     .= " $operand";
1491
                        $query     .= " $operand";
1490
                        $query_cgi .= "&op=".uri_escape_utf8($operators[$i-1]);
1492
                        $query_cgi .= "&op=".$operators[$i-1];
1491
                        $query_cgi .= "&idx=".uri_escape_utf8($index) if $index;
1493
                        $query_cgi .= "&idx=".$index if $index;
1492
                        $query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1494
                        $query_cgi .= "&q=".$operands[$i] if $operands[$i];
1493
                        $query_desc .=
1495
                        $query_desc .=
1494
                          " $operators[$i-1] $index_plus $operands[$i]";
1496
                          " $operators[$i-1] $index_plus $operands[$i]";
1495
                    }
1497
                    }
Lines 1499-1506 sub buildQuery { Link Here
1499
                        $query      .= " and ";
1501
                        $query      .= " and ";
1500
                        $query      .= "$index_plus " unless $indexes_set;
1502
                        $query      .= "$index_plus " unless $indexes_set;
1501
                        $query      .= "$operand";
1503
                        $query      .= "$operand";
1502
                        $query_cgi  .= "&op=and&idx=".uri_escape_utf8($index) if $index;
1504
                        $query_cgi  .= "&op=and&idx=".$index if $index;
1503
                        $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1505
                        $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1504
                        $query_desc .= " and $index_plus $operands[$i]";
1506
                        $query_desc .= " and $index_plus $operands[$i]";
1505
                    }
1507
                    }
1506
                }
1508
                }
Lines 1512-1519 sub buildQuery { Link Here
1512
                    $query .= " $index_plus " unless $indexes_set;
1514
                    $query .= " $index_plus " unless $indexes_set;
1513
                    $query .= $operand;
1515
                    $query .= $operand;
1514
                    $query_desc .= " $index_plus $operands[$i]";
1516
                    $query_desc .= " $index_plus $operands[$i]";
1515
                    $query_cgi  .= "&idx=".uri_escape_utf8($index) if $index;
1517
                    $query_cgi  .= "&idx=".$index if $index;
1516
                    $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1518
                    $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1517
                    $previous_operand = 1;
1519
                    $previous_operand = 1;
1518
                }
1520
                }
1519
            }    #/if $operands
1521
            }    #/if $operands
1520
- 

Return to bug 11944