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

(-)a/authorities/ysearch.pl (+20 lines)
Lines 53-64 if ( $auth_status ne "ok" ) { Link Here
53
my @value        = $query->multi_param('term');
53
my @value        = $query->multi_param('term');
54
my $searchtype   = $query->param('querytype');
54
my $searchtype   = $query->param('querytype');
55
my @marclist     = ($searchtype);
55
my @marclist     = ($searchtype);
56
my $index        = $query->param('index');
56
my $authtypecode = $query->param('authtypecode');
57
my $authtypecode = $query->param('authtypecode');
57
my @and_or       = $query->multi_param('and_or');
58
my @and_or       = $query->multi_param('and_or');
58
my @excluding    = $query->multi_param('excluding');
59
my @excluding    = $query->multi_param('excluding');
59
my @operator     = $query->multi_param('operator');
60
my @operator     = $query->multi_param('operator');
60
my $orderby      = $query->param('orderby');
61
my $orderby      = $query->param('orderby');
61
62
63
if ( C4::Context->preference('ConsiderHeadingUse') ) {
64
    my $marcflavour = C4::Context->preference('marcflavour');
65
    my $biblio_tag  = substr( $index, 4, 3 );
66
    if ( $marcflavour eq 'MARC21' ) {
67
        my $heading_use_search_field =
68
              $biblio_tag =~ /^[127]/ ? 'Heading-use-main-or-added-entry'
69
            : $biblio_tag =~ /^6/     ? 'Heading-use-subject-added-entry'
70
            : $biblio_tag =~ /^[48]/  ? 'Heading-use-series-added-entry'
71
            :                           undef;
72
        if ($heading_use_search_field) {
73
            push @marclist,  $heading_use_search_field;
74
            push @and_or,    'and';
75
            push @excluding, '';
76
            push @operator,  'is';
77
            push @value,     'a';
78
        }
79
    }
80
}
81
62
my $resultsperpage = 50;
82
my $resultsperpage = 50;
63
my $startfrom      = 0;
83
my $startfrom      = 0;
64
84
(-)a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js (-1 / +4 lines)
Lines 19-24 $(document).ready(function () { Link Here
19
                url: "/cgi-bin/koha/authorities/ysearch.pl",
19
                url: "/cgi-bin/koha/authorities/ysearch.pl",
20
                dataType: "json",
20
                dataType: "json",
21
                data: {
21
                data: {
22
                    index: index,
22
                    authtypecode: authtypecode,
23
                    authtypecode: authtypecode,
23
                    term: request.term,
24
                    term: request.term,
24
                    op: "do_search",
25
                    op: "do_search",
Lines 52-57 $(document).ready(function () { Link Here
52
                url: "/cgi-bin/koha/authorities/ysearch.pl",
53
                url: "/cgi-bin/koha/authorities/ysearch.pl",
53
                dataType: "json",
54
                dataType: "json",
54
                data: {
55
                data: {
56
                    index: index,
55
                    authtypecode: authtypecode,
57
                    authtypecode: authtypecode,
56
                    term: request.term,
58
                    term: request.term,
57
                    op: "do_search",
59
                    op: "do_search",
Lines 85-90 $(document).ready(function () { Link Here
85
                url: "/cgi-bin/koha/authorities/ysearch.pl",
87
                url: "/cgi-bin/koha/authorities/ysearch.pl",
86
                dataType: "json",
88
                dataType: "json",
87
                data: {
89
                data: {
90
                    index: index,
88
                    authtypecode: authtypecode,
91
                    authtypecode: authtypecode,
89
                    term: request.term,
92
                    term: request.term,
90
                    op: "do_search",
93
                    op: "do_search",
Lines 118-123 $(document).ready(function () { Link Here
118
                url: "/cgi-bin/koha/authorities/ysearch.pl",
121
                url: "/cgi-bin/koha/authorities/ysearch.pl",
119
                dataType: "json",
122
                dataType: "json",
120
                data: {
123
                data: {
124
                    index: index,
121
                    authtypecode: authtypecode,
125
                    authtypecode: authtypecode,
122
                    term: request.term,
126
                    term: request.term,
123
                    op: "do_search",
127
                    op: "do_search",
124
- 

Return to bug 38514