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

(-)a/authorities/ysearch.pl (-7 / +27 lines)
Lines 49-62 if ( $auth_status ne "ok" ) { Link Here
49
    exit 0;
49
    exit 0;
50
}
50
}
51
51
52
    my @value      = $query->multi_param('term');
52
    my @value        = $query->multi_param('term');
53
    my $searchtype = $query->param('querytype');
53
    my $searchtype   = $query->param('querytype');
54
    my @marclist  = ($searchtype);
54
    my @marclist     = ($searchtype);
55
    my $index        = $query->param('index');
55
    my $authtypecode = $query->param('authtypecode');
56
    my $authtypecode = $query->param('authtypecode');
56
    my @and_or    = $query->multi_param('and_or');
57
    my @and_or       = $query->multi_param('and_or');
57
    my @excluding = $query->multi_param('excluding');
58
    my @excluding    = $query->multi_param('excluding');
58
    my @operator  = $query->multi_param('operator');
59
    my @operator     = $query->multi_param('operator');
59
    my $orderby   = $query->param('orderby');
60
    my $orderby      = $query->param('orderby');
61
62
    if ( C4::Context->preference('ConsiderHeadingUse') ) {
63
        my $marcflavour = C4::Context->preference('marcflavour');
64
        my $biblio_tag  = substr( $index, 4, 3 );
65
        if ( $marcflavour eq 'MARC21' ) {
66
            my $heading_use_search_field =
67
                  $biblio_tag =~ /^[127]/ ? 'Heading-use-main-or-added-entry'
68
                : $biblio_tag =~ /^6/     ? 'Heading-use-subject-added-entry'
69
                : $biblio_tag =~ /^[48]/  ? 'Heading-use-series-added-entry'
70
                :                           undef;
71
            if ($heading_use_search_field) {
72
                push @marclist,  $heading_use_search_field;
73
                push @and_or,    'and';
74
                push @excluding, '';
75
                push @operator,  'is';
76
                push @value,     'a';
77
            }
78
        }
79
    }
60
80
61
    my $resultsperpage = 50;
81
    my $resultsperpage = 50;
62
    my $startfrom = 0;
82
    my $startfrom = 0;
(-)a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js (-1 / +4 lines)
Lines 16-21 $(document).ready(function(){ Link Here
16
                url: "/cgi-bin/koha/authorities/ysearch.pl",
16
                url: "/cgi-bin/koha/authorities/ysearch.pl",
17
                dataType: "json",
17
                dataType: "json",
18
                data: {
18
                data: {
19
                    index : index,
19
                    authtypecode : authtypecode,
20
                    authtypecode : authtypecode,
20
                    term: request.term,
21
                    term: request.term,
21
                    op: "do_search",
22
                    op: "do_search",
Lines 47-52 $(document).ready(function(){ Link Here
47
                url: "/cgi-bin/koha/authorities/ysearch.pl",
48
                url: "/cgi-bin/koha/authorities/ysearch.pl",
48
                dataType: "json",
49
                dataType: "json",
49
                data: {
50
                data: {
51
                    index : index,
50
                    authtypecode : authtypecode,
52
                    authtypecode : authtypecode,
51
                    term: request.term,
53
                    term: request.term,
52
                    op: "do_search",
54
                    op: "do_search",
Lines 78-83 $(document).ready(function(){ Link Here
78
                url: "/cgi-bin/koha/authorities/ysearch.pl",
80
                url: "/cgi-bin/koha/authorities/ysearch.pl",
79
                dataType: "json",
81
                dataType: "json",
80
                data: {
82
                data: {
83
                    index : index,
81
                    authtypecode : authtypecode,
84
                    authtypecode : authtypecode,
82
                    term: request.term,
85
                    term: request.term,
83
                    op: "do_search",
86
                    op: "do_search",
Lines 109-114 $(document).ready(function(){ Link Here
109
                url: "/cgi-bin/koha/authorities/ysearch.pl",
112
                url: "/cgi-bin/koha/authorities/ysearch.pl",
110
                dataType: "json",
113
                dataType: "json",
111
                data: {
114
                data: {
115
                    index : index,
112
                    authtypecode : authtypecode,
116
                    authtypecode : authtypecode,
113
                    term: request.term,
117
                    term: request.term,
114
                    op: "do_search",
118
                    op: "do_search",
115
- 

Return to bug 38514