|
Lines 24-74
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 ); |
| 31 |
|
27 |
|
| 32 |
my $input = CGI->new; |
28 |
my $input = CGI->new; |
| 33 |
my $dbh = C4::Context->dbh; |
29 |
my $dbh = C4::Context->dbh; |
| 34 |
my $error = $input->param('error'); |
30 |
my $error = $input->param('error'); |
| 35 |
my $authid = $input->param('authid') || 0; |
31 |
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 |
|
| 47 |
my $nameany = $input->param('nameany'); |
32 |
my $nameany = $input->param('nameany'); |
| 48 |
my $authorany = $input->param('authorany'); |
33 |
my $authorany = $input->param('authorany'); |
| 49 |
my $authorcorp = |
34 |
my $authorcorp = $input->param('authorcorp'); |
| 50 |
$record |
35 |
my $authorpersonal = $input->param('authorpersonal'); |
| 51 |
? $record->subfield( $authfields_mapping->{'authorcorp'}, 'a' ) |
36 |
my $authormeetingcon = $input->param('authormeetingcon'); |
| 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 |
|
| 62 |
my $title = $input->param('title'); |
37 |
my $title = $input->param('title'); |
| 63 |
my $uniformtitle = |
38 |
my $uniformtitle = $input->param('uniformtitle'); |
| 64 |
$record |
39 |
my $subject = $input->param('subject'); |
| 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 |
|
| 72 |
my $subjectsubdiv = $input->param('subjectsubdiv'); |
40 |
my $subjectsubdiv = $input->param('subjectsubdiv'); |
| 73 |
my $srchany = $input->param('srchany'); |
41 |
my $srchany = $input->param('srchany'); |
| 74 |
my $op = $input->param('op')||''; |
42 |
my $op = $input->param('op')||''; |
| 75 |
- |
|
|