Lines 24-34
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 C4::AuthoritiesMarc qw( GetAuthority); |
28 |
use MARC::Record; |
29 |
use Koha::Authorities; |
30 |
use Koha::Authority::Types; |
27 |
|
31 |
|
28 |
my $input = CGI->new; |
32 |
my $input = CGI->new; |
29 |
my $dbh = C4::Context->dbh; |
33 |
my $dbh = C4::Context->dbh; |
|
|
34 |
my $marcflavour = C4::Context->preference("marcflavour"); |
30 |
my $error = $input->param('error'); |
35 |
my $error = $input->param('error'); |
31 |
my $authid = $input->param('authid') || 0; |
36 |
my $authid = $input->param('authid') || 0; |
|
|
37 |
|
38 |
my $record = GetAuthority($authid); |
39 |
my $authobj = Koha::Authorities->find($authid); |
40 |
my $authtypecode = $authobj ? $authobj->authtypecode : ''; |
41 |
my $authority_type = Koha::Authority::Types->find($authtypecode); |
42 |
my $authtag = $authority_type->auth_tag_to_report; |
43 |
my $authfields = $authtag ? $record->field($authtag) : ''; |
32 |
my $nameany = $input->param('nameany'); |
44 |
my $nameany = $input->param('nameany'); |
33 |
my $authorany = $input->param('authorany'); |
45 |
my $authorany = $input->param('authorany'); |
34 |
my $authorcorp = $input->param('authorcorp'); |
46 |
my $authorcorp = $input->param('authorcorp'); |
Lines 45-50
my $index =$input->param('index');
Link Here
|
45 |
$page = $input->param('goto_page') if $input->param('changepage_goto'); |
57 |
$page = $input->param('goto_page') if $input->param('changepage_goto'); |
46 |
my $controlnumber = $input->param('controlnumber'); |
58 |
my $controlnumber = $input->param('controlnumber'); |
47 |
|
59 |
|
|
|
60 |
if (! $authorpersonal) { |
61 |
if ($marcflavour eq 'MARC21' && $authtag == 100) { |
62 |
$authorpersonal = $authfields->subfield('a'); |
63 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 200) { |
64 |
$authorpersonal = $authfields->subfield('a'); |
65 |
} |
66 |
} |
67 |
|
68 |
if (! $authormeetingcon) { |
69 |
if ($marcflavour eq 'MARC21' && $authtag == 110) { |
70 |
$authormeetingcon = $authfields->subfield('a'); |
71 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 210) { |
72 |
$authormeetingcon = $authfields->subfield('a'); |
73 |
} |
74 |
} |
75 |
|
76 |
if (! $uniformtitle) { |
77 |
if ($marcflavour eq 'MARC21' && $authtag == 130) { |
78 |
$uniformtitle = $authfields->subfield('a'); |
79 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 230) { |
80 |
$uniformtitle = $authfields->subfield('a'); |
81 |
} |
82 |
} |
83 |
|
84 |
if (! $subject) { |
85 |
if ($marcflavour eq 'UNIMARC' && $authtag == 250) { |
86 |
$subject = $authfields->subfield('a'); |
87 |
} |
88 |
} |
89 |
|
48 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ |
90 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ |
49 |
template_name => "cataloguing/z3950_auth_search.tt", |
91 |
template_name => "cataloguing/z3950_auth_search.tt", |
50 |
query => $input, |
92 |
query => $input, |
51 |
- |
|
|