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

(-)a/cataloguing/z3950_auth_search.pl (-6 / +37 lines)
Lines 24-42 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Breeding qw( Z3950Search Z3950SearchAuth );
26
use C4::Breeding qw( Z3950Search Z3950SearchAuth );
27
use MARC::Record;
28
use Koha::Authorities;
29
use Koha::Authority::Types;
30
use C4::AuthoritiesMarc qw( GetAuthority );
27
31
28
my $input        = CGI->new;
32
my $input        = CGI->new;
29
my $dbh          = C4::Context->dbh;
33
my $dbh          = C4::Context->dbh;
30
my $error         = $input->param('error');
34
my $error         = $input->param('error');
31
my $authid  = $input->param('authid') || 0;
35
my $authid  = $input->param('authid') || 0;
36
37
my $record         = GetAuthority($authid);
38
my $marc_flavour = C4::Context->preference('marcflavour');
39
my $authfields_mapping = {
40
    'authorpersonal'   => $marc_flavour eq 'MARC21' ? '100' : '200',
41
    'authorcorp'       => $marc_flavour eq 'MARC21' ? '110' : '210',
42
    'authormeetingcon' => $marc_flavour eq 'MARC21' ? '111' : '210',
43
    'uniformtitle'     => $marc_flavour eq 'MARC21' ? '130' : '230',
44
    'subject'          => $marc_flavour eq 'MARC21' ? '150' : '250',
45
};
46
32
my $nameany     = $input->param('nameany');
47
my $nameany     = $input->param('nameany');
33
my $authorany     = $input->param('authorany');
48
my $authorany     = $input->param('authorany');
34
my $authorcorp     = $input->param('authorcorp');
49
my $authorcorp =
35
my $authorpersonal     = $input->param('authorpersonal');
50
    $record
36
my $authormeetingcon     = $input->param('authormeetingcon');
51
  ? $record->subfield( $authfields_mapping->{'authorcorp'}, 'a' )
52
  : $input->param('authorcorp');
53
my $authorpersonal =
54
    $record
55
  ? $record->subfield( $authfields_mapping->{'authorpersonal'}, 'a' )
56
  : $input->param('authorpersonal');
57
my $authormeetingcon =
58
    $record
59
  ? $record->subfield( $authfields_mapping->{'authormeetingcon'}, 'a' )
60
  : $input->param('authormeetingcon');
61
37
my $title         = $input->param('title');
62
my $title         = $input->param('title');
38
my $uniformtitle         = $input->param('uniformtitle');
63
my $uniformtitle =
39
my $subject       = $input->param('subject');
64
    $record
65
  ? $record->subfield( $authfields_mapping->{'uniformtitle'}, 'a' )
66
  : $input->param('uniformtitle');
67
my $subject =
68
    $record
69
  ? $record->subfield( $authfields_mapping->{'subject'}, 'a' )
70
  : $input->param('subject');
71
40
my $subjectsubdiv       = $input->param('subjectsubdiv');
72
my $subjectsubdiv       = $input->param('subjectsubdiv');
41
my $srchany       = $input->param('srchany');
73
my $srchany       = $input->param('srchany');
42
my $op            = $input->param('op')||'';
74
my $op            = $input->param('op')||'';
43
- 

Return to bug 29173