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

(-)a/C4/Koha.pm (-19 / +19 lines)
Lines 343-378 sub getFacets { Link Here
343
            {
343
            {
344
                idx   => 'su-to',
344
                idx   => 'su-to',
345
                label => 'Topics',
345
                label => 'Topics',
346
                tags  => [qw/ 600ab 601ab 602a 604at 605a 606ax 610a /],
346
                tags  => [qw( 600ab 601ab 602a 604at 605a 606ax 610a )],
347
                sep   => ' - ',
347
                sep   => ' - ',
348
            },
348
            },
349
            {
349
            {
350
                idx   => 'su-geo',
350
                idx   => 'su-geo',
351
                label => 'Places',
351
                label => 'Places',
352
                tags  => [qw/ 607a /],
352
                tags  => [qw( 607a )],
353
                sep   => ' - ',
353
                sep   => ' - ',
354
            },
354
            },
355
            {
355
            {
356
                idx   => 'au',
356
                idx   => 'au',
357
                label => 'Authors',
357
                label => 'Authors',
358
                tags  => [qw/ 700ab 701ab 702ab /],
358
                tags  => [qw( 700ab 701ab 702ab )],
359
                sep   => C4::Context->preference("UNIMARCAuthorsFacetsSeparator"),
359
                sep   => C4::Context->preference("UNIMARCAuthorsFacetsSeparator"),
360
            },
360
            },
361
            {
361
            {
362
                idx   => 'se',
362
                idx   => 'se',
363
                label => 'Series',
363
                label => 'Series',
364
                tags  => [qw/ 225a /],
364
                tags  => [qw( 225a )],
365
                sep   => ', ',
365
                sep   => ', ',
366
            },
366
            },
367
            {
367
            {
368
                idx   => 'location',
368
                idx   => 'location',
369
                label => 'Location',
369
                label => 'Location',
370
                tags  => [qw/ 995e /],
370
                tags  => [qw( 995e )],
371
            },
371
            },
372
            {
372
            {
373
                idx   => 'ccode',
373
                idx   => 'ccode',
374
                label => 'Collections',
374
                label => 'Collections',
375
                tags  => [qw / 099t 955h /],
375
                tags  => [qw( 099t 955h )],
376
            }
376
            }
377
        ];
377
        ];
378
378
Lines 386-392 sub getFacets { Link Here
386
                    {
386
                    {
387
                        idx   => 'holdingbranch',
387
                        idx   => 'holdingbranch',
388
                        label => 'Holding libraries',
388
                        label => 'Holding libraries',
389
                        tags  => [qw / 995c /],
389
                        tags  => [qw( 995c )],
390
                    }
390
                    }
391
                );
391
                );
392
            }
392
            }
Lines 399-405 sub getFacets { Link Here
399
                    {
399
                    {
400
                        idx   => 'homebranch',
400
                        idx   => 'homebranch',
401
                        label => 'Home libraries',
401
                        label => 'Home libraries',
402
                        tags  => [qw / 995b /],
402
                        tags  => [qw( 995b )],
403
                    }
403
                    }
404
                );
404
                );
405
            }
405
            }
Lines 409-463 sub getFacets { Link Here
409
            {
409
            {
410
                idx   => 'su-to',
410
                idx   => 'su-to',
411
                label => 'Topics',
411
                label => 'Topics',
412
                tags  => [qw/ 650a /],
412
                tags  => [qw( 650a )],
413
                sep   => '--',
413
                sep   => '--',
414
            },
414
            },
415
415
416
            #        {
416
            #        {
417
            #        idx   => 'su-na',
417
            #        idx   => 'su-na',
418
            #        label => 'People and Organizations',
418
            #        label => 'People and Organizations',
419
            #        tags  => [ qw/ 600a 610a 611a / ],
419
            #        tags  => [qw( 600a 610a 611a )],
420
            #        sep   => 'a',
420
            #        sep   => 'a',
421
            #        },
421
            #        },
422
            {
422
            {
423
                idx   => 'su-geo',
423
                idx   => 'su-geo',
424
                label => 'Places',
424
                label => 'Places',
425
                tags  => [qw/ 651a /],
425
                tags  => [qw( 651a )],
426
                sep   => '--',
426
                sep   => '--',
427
            },
427
            },
428
            {
428
            {
429
                idx   => 'su-ut',
429
                idx   => 'su-ut',
430
                label => 'Titles',
430
                label => 'Titles',
431
                tags  => [qw/ 630a /],
431
                tags  => [qw( 630a )],
432
                sep   => '--',
432
                sep   => '--',
433
            },
433
            },
434
            {
434
            {
435
                idx   => 'au',
435
                idx   => 'au',
436
                label => 'Authors',
436
                label => 'Authors',
437
                tags  => [qw/ 100a 110a 700a /],
437
                tags  => [qw( 100a 110a 700a )],
438
                sep   => ', ',
438
                sep   => ', ',
439
            },
439
            },
440
            {
440
            {
441
                idx   => 'se',
441
                idx   => 'se',
442
                label => 'Series',
442
                label => 'Series',
443
                tags  => [qw/ 440a 490a /],
443
                tags  => [qw( 440a 490a )],
444
                sep   => ', ',
444
                sep   => ', ',
445
            },
445
            },
446
            {
446
            {
447
                idx   => 'itype',
447
                idx   => 'itype',
448
                label => 'Item types',
448
                label => 'Item types',
449
                tags  => [qw/ 952y 942c /],
449
                tags  => [qw( 952y 942c )],
450
                sep   => ', ',
450
                sep   => ', ',
451
            },
451
            },
452
            {
452
            {
453
                idx   => 'location',
453
                idx   => 'location',
454
                label => 'Location',
454
                label => 'Location',
455
                tags  => [qw / 952c /],
455
                tags  => [qw( 952c )],
456
            },
456
            },
457
            {
457
            {
458
                idx   => 'ccode',
458
                idx   => 'ccode',
459
                label => 'Collections',
459
                label => 'Collections',
460
                tags  => [qw / 9528 /],
460
                tags  => [qw( 9528 )],
461
            }
461
            }
462
        ];
462
        ];
463
463
Lines 471-477 sub getFacets { Link Here
471
                    {
471
                    {
472
                        idx   => 'holdingbranch',
472
                        idx   => 'holdingbranch',
473
                        label => 'Holding libraries',
473
                        label => 'Holding libraries',
474
                        tags  => [qw / 952b /],
474
                        tags  => [qw( 952b )],
475
                    }
475
                    }
476
                );
476
                );
477
            }
477
            }
Lines 484-490 sub getFacets { Link Here
484
                    {
484
                    {
485
                        idx   => 'homebranch',
485
                        idx   => 'homebranch',
486
                        label => 'Home libraries',
486
                        label => 'Home libraries',
487
                        tags  => [qw / 952a /],
487
                        tags  => [qw( 952a )],
488
                    }
488
                    }
489
                );
489
                );
490
            }
490
            }
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-2 / +7 lines)
Lines 1449-1456 sub _is_safe_to_auto_truncate { Link Here
1449
    my $do_not_autotruncate_fields_ref = $cache->get_from_cache( $cache_key, { unsafe => 1 } );
1449
    my $do_not_autotruncate_fields_ref = $cache->get_from_cache( $cache_key, { unsafe => 1 } );
1450
    %do_not_autotruncate_fields = %$do_not_autotruncate_fields_ref if $do_not_autotruncate_fields_ref;
1450
    %do_not_autotruncate_fields = %$do_not_autotruncate_fields_ref if $do_not_autotruncate_fields_ref;
1451
    if ( !scalar( keys %do_not_autotruncate_fields ) ) {
1451
    if ( !scalar( keys %do_not_autotruncate_fields ) ) {
1452
        %do_not_autotruncate_fields =
1452
        %do_not_autotruncate_fields = map { $_ => 1 } qw(
1453
            map { $_ => 1 } qw / biblioitemnumber host-item-number itemnumber koha-auth-number local-number /;
1453
            biblioitemnumber
1454
            host-item-number
1455
            itemnumber
1456
            koha-auth-number
1457
            local-number
1458
        );
1454
1459
1455
        # In addition, under no circumstances should non-text fields
1460
        # In addition, under no circumstances should non-text fields
1456
        # be auto truncated.
1461
        # be auto truncated.
(-)a/cataloguing/z3950_auth_search.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw / -utf8 /;
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-search.pl (-2 / +16 lines)
Lines 402-411 for ( keys %$params ) { Link Here
402
# sort by is used to sort the query
402
# sort by is used to sort the query
403
# in theory can have more than one but generally there's just one
403
# in theory can have more than one but generally there's just one
404
my @sort_by;
404
my @sort_by;
405
my @allowed_sortby =
405
my @allowed_sortby = qw(
406
    qw /acqdate_asc acqdate_dsc author_az author_za call_number_asc call_number_dsc popularity_asc popularity_dsc pubdate_asc pubdate_dsc relevance title_az title_za/;
406
    acqdate_asc
407
    acqdate_dsc
408
    author_az
409
    author_za
410
    call_number_asc
411
    call_number_dsc
412
    popularity_asc
413
    popularity_dsc
414
    pubdate_asc
415
    pubdate_dsc
416
    relevance
417
    title_az
418
    title_za
419
);
407
@sort_by = $cgi->multi_param('sort_by');
420
@sort_by = $cgi->multi_param('sort_by');
408
$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
421
$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
422
409
foreach my $sort (@sort_by) {
423
foreach my $sort (@sort_by) {
410
    if ( grep { $_ eq $sort } @allowed_sortby ) {
424
    if ( grep { $_ eq $sort } @allowed_sortby ) {
411
        $template->param( $sort => 1 );
425
        $template->param( $sort => 1 );
(-)a/tools/inventory.pl (-10 / +33 lines)
Lines 440-452 if ( defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on' ) Link Here
440
    my $columns = Koha::Database::Columns->columns;
440
    my $columns = Koha::Database::Columns->columns;
441
    my @translated_keys;
441
    my @translated_keys;
442
    for my $key (
442
    for my $key (
443
        qw / biblio.title    biblio.author
443
        qw(
444
        items.barcode        items.itemnumber
444
        biblio.title
445
        items.homebranch     items.location   items.ccode
445
        biblio.author
446
        items.itemcallnumber items.enumchron  items.notforloan
446
        items.barcode
447
        items.itemlost       items.damaged
447
        items.itemnumber
448
        items.withdrawn      items.stocknumber
448
        items.homebranch
449
        /
449
        items.location
450
        items.ccode
451
        items.itemcallnumber
452
        items.enumchron
453
        items.notforloan
454
        items.itemlost
455
        items.damaged
456
        items.withdrawn
457
        items.stocknumber
458
        )
450
        )
459
        )
451
    {
460
    {
452
        my ( $table, $column ) = split '\.', $key;
461
        my ( $table, $column ) = split '\.', $key;
Lines 457-464 if ( defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on' ) Link Here
457
    $csv->combine(@translated_keys);
466
    $csv->combine(@translated_keys);
458
    print $csv->string, "\n";
467
    print $csv->string, "\n";
459
468
460
    my @keys =
469
    my @keys = qw(
461
        qw/ title author barcode itemnumber homebranch location ccode itemcallnumber enumchron notforloan itemlost damaged withdrawn stocknumber /;
470
        title
471
        author
472
        barcode
473
        itemnumber
474
        homebranch
475
        location
476
        ccode
477
        itemcallnumber
478
        enumchron
479
        notforloan
480
        itemlost
481
        damaged
482
        withdrawn
483
        stocknumber
484
    );
485
462
    for my $item (@$loop) {
486
    for my $item (@$loop) {
463
        my @line;
487
        my @line;
464
        for my $key (@keys) {
488
        for my $key (@keys) {
465
- 

Return to bug 42092