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 1312-1328 sub buildQuery { Link Here
1312
        if ( @limits ) {
1314
        if ( @limits ) {
1313
            $q .= ' and '.join(' and ', @limits);
1315
            $q .= ' and '.join(' and ', @limits);
1314
        }
1316
        }
1315
        return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $q, '', '', '', '', 'ccl' );
1317
        return ( undef, $q, $q, "q=ccl=".$q, $q, '', '', '', '', 'ccl' );
1316
    }
1318
    }
1317
    if ( $query =~ /^cql=/ ) {
1319
    if ( $query =~ /^cql=/ ) {
1318
        return ( undef, $', $', "q=cql=".uri_escape_utf8($'), $', '', '', '', '', 'cql' );
1320
        return ( undef, $', $', "q=cql=".$', $', '', '', '', '', 'cql' );
1319
    }
1321
    }
1320
    if ( $query =~ /^pqf=/ ) {
1322
    if ( $query =~ /^pqf=/ ) {
1321
        if ($query_desc) {
1323
        if ($query_desc) {
1322
            $query_cgi = "q=".uri_escape_utf8($query_desc);
1324
            $query_cgi = "q=".$query_desc;
1323
        } else {
1325
        } else {
1324
            $query_desc = $';
1326
            $query_desc = $';
1325
            $query_cgi = "q=pqf=".uri_escape_utf8($');
1327
            $query_cgi = "q=pqf=".$';
1326
        }
1328
        }
1327
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1329
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1328
    }
1330
    }
Lines 1494-1502 sub buildQuery { Link Here
1494
                        $query     .= " $operators[$i-1] ";
1496
                        $query     .= " $operators[$i-1] ";
1495
                        $query     .= " $index_plus " unless $indexes_set;
1497
                        $query     .= " $index_plus " unless $indexes_set;
1496
                        $query     .= " $operand";
1498
                        $query     .= " $operand";
1497
                        $query_cgi .= "&op=".uri_escape_utf8($operators[$i-1]);
1499
                        $query_cgi .= "&op=".$operators[$i-1];
1498
                        $query_cgi .= "&idx=".uri_escape_utf8($index) if $index;
1500
                        $query_cgi .= "&idx=".$index if $index;
1499
                        $query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1501
                        $query_cgi .= "&q=".$operands[$i] if $operands[$i];
1500
                        $query_desc .=
1502
                        $query_desc .=
1501
                          " $operators[$i-1] $index_plus $operands[$i]";
1503
                          " $operators[$i-1] $index_plus $operands[$i]";
1502
                    }
1504
                    }
Lines 1506-1513 sub buildQuery { Link Here
1506
                        $query      .= " and ";
1508
                        $query      .= " and ";
1507
                        $query      .= "$index_plus " unless $indexes_set;
1509
                        $query      .= "$index_plus " unless $indexes_set;
1508
                        $query      .= "$operand";
1510
                        $query      .= "$operand";
1509
                        $query_cgi  .= "&op=and&idx=".uri_escape_utf8($index) if $index;
1511
                        $query_cgi  .= "&op=and&idx=".$index if $index;
1510
                        $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1512
                        $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1511
                        $query_desc .= " and $index_plus $operands[$i]";
1513
                        $query_desc .= " and $index_plus $operands[$i]";
1512
                    }
1514
                    }
1513
                }
1515
                }
Lines 1519-1526 sub buildQuery { Link Here
1519
                    $query .= " $index_plus " unless $indexes_set;
1521
                    $query .= " $index_plus " unless $indexes_set;
1520
                    $query .= $operand;
1522
                    $query .= $operand;
1521
                    $query_desc .= " $index_plus $operands[$i]";
1523
                    $query_desc .= " $index_plus $operands[$i]";
1522
                    $query_cgi  .= "&idx=".uri_escape_utf8($index) if $index;
1524
                    $query_cgi  .= "&idx=".$index if $index;
1523
                    $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1525
                    $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1524
                    $previous_operand = 1;
1526
                    $previous_operand = 1;
1525
                }
1527
                }
1526
            }    #/if $operands
1528
            }    #/if $operands
1527
- 

Return to bug 11944