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

(-)a/C4/Search.pm (-12 / +13 lines)
Lines 517-522 sub getRecords { Link Here
517
                                next;
517
                                next;
518
                            }
518
                            }
519
519
520
                            SetUTF8Flag($marc_record);
521
520
                            my @used_datas = ();
522
                            my @used_datas = ();
521
523
522
                            foreach my $tag ( @{ $facet->{tags} } ) {
524
                            foreach my $tag ( @{ $facet->{tags} } ) {
Lines 1311-1327 sub buildQuery { Link Here
1311
        if ( @limits ) {
1313
        if ( @limits ) {
1312
            $q .= ' and '.join(' and ', @limits);
1314
            $q .= ' and '.join(' and ', @limits);
1313
        }
1315
        }
1314
        return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $q, '', '', '', '', 'ccl' );
1316
        return ( undef, $q, $q, "q=ccl=".$q, $q, '', '', '', '', 'ccl' );
1315
    }
1317
    }
1316
    if ( $query =~ /^cql=/ ) {
1318
    if ( $query =~ /^cql=/ ) {
1317
        return ( undef, $', $', "q=cql=".uri_escape_utf8($'), $', '', '', '', '', 'cql' );
1319
        return ( undef, $', $', "q=cql=".$', $', '', '', '', '', 'cql' );
1318
    }
1320
    }
1319
    if ( $query =~ /^pqf=/ ) {
1321
    if ( $query =~ /^pqf=/ ) {
1320
        if ($query_desc) {
1322
        if ($query_desc) {
1321
            $query_cgi = "q=".uri_escape_utf8($query_desc);
1323
            $query_cgi = "q=".$query_desc;
1322
        } else {
1324
        } else {
1323
            $query_desc = $';
1325
            $query_desc = $';
1324
            $query_cgi = "q=pqf=".uri_escape_utf8($');
1326
            $query_cgi = "q=pqf=".$';
1325
        }
1327
        }
1326
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1328
        return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' );
1327
    }
1329
    }
Lines 1493-1501 sub buildQuery { Link Here
1493
                        $query     .= " $operators[$i-1] ";
1495
                        $query     .= " $operators[$i-1] ";
1494
                        $query     .= " $index_plus " unless $indexes_set;
1496
                        $query     .= " $index_plus " unless $indexes_set;
1495
                        $query     .= " $operand";
1497
                        $query     .= " $operand";
1496
                        $query_cgi .= "&op=".uri_escape_utf8($operators[$i-1]);
1498
                        $query_cgi .= "&op=".$operators[$i-1];
1497
                        $query_cgi .= "&idx=".uri_escape_utf8($index) if $index;
1499
                        $query_cgi .= "&idx=".$index if $index;
1498
                        $query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1500
                        $query_cgi .= "&q=".$operands[$i] if $operands[$i];
1499
                        $query_desc .=
1501
                        $query_desc .=
1500
                          " $operators[$i-1] $index_plus $operands[$i]";
1502
                          " $operators[$i-1] $index_plus $operands[$i]";
1501
                    }
1503
                    }
Lines 1505-1512 sub buildQuery { Link Here
1505
                        $query      .= " and ";
1507
                        $query      .= " and ";
1506
                        $query      .= "$index_plus " unless $indexes_set;
1508
                        $query      .= "$index_plus " unless $indexes_set;
1507
                        $query      .= "$operand";
1509
                        $query      .= "$operand";
1508
                        $query_cgi  .= "&op=and&idx=".uri_escape_utf8($index) if $index;
1510
                        $query_cgi  .= "&op=and&idx=".$index if $index;
1509
                        $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1511
                        $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1510
                        $query_desc .= " and $index_plus $operands[$i]";
1512
                        $query_desc .= " and $index_plus $operands[$i]";
1511
                    }
1513
                    }
1512
                }
1514
                }
Lines 1518-1525 sub buildQuery { Link Here
1518
                    $query .= " $index_plus " unless $indexes_set;
1520
                    $query .= " $index_plus " unless $indexes_set;
1519
                    $query .= $operand;
1521
                    $query .= $operand;
1520
                    $query_desc .= " $index_plus $operands[$i]";
1522
                    $query_desc .= " $index_plus $operands[$i]";
1521
                    $query_cgi  .= "&idx=".uri_escape_utf8($index) if $index;
1523
                    $query_cgi  .= "&idx=".$index if $index;
1522
                    $query_cgi  .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i];
1524
                    $query_cgi  .= "&q=".$operands[$i] if $operands[$i];
1523
                    $previous_operand = 1;
1525
                    $previous_operand = 1;
1524
                }
1526
                }
1525
            }    #/if $operands
1527
            }    #/if $operands
1526
- 

Return to bug 11944