|
Lines 31-45
use Koha::Authority::Types;
Link Here
|
| 31 |
|
31 |
|
| 32 |
my $input = CGI->new; |
32 |
my $input = CGI->new; |
| 33 |
my $dbh = C4::Context->dbh; |
33 |
my $dbh = C4::Context->dbh; |
|
|
34 |
my $marcflavour = C4::Context->preference("marcflavour"); |
| 34 |
my $error = $input->param('error'); |
35 |
my $error = $input->param('error'); |
| 35 |
my $authid = $input->param('authid') || 0; |
36 |
my $authid = $input->param('authid') || 0; |
| 36 |
|
37 |
|
| 37 |
my $record = GetAuthority($authid); |
38 |
my $record = GetAuthority($authid); |
| 38 |
my $authobj = Koha::Authorities->find($authid); |
39 |
my $authobj = Koha::Authorities->find($authid); |
| 39 |
my $authtypecode = $authobj ? $authobj->authtypecode : ''; |
40 |
my $authtypecode = $authobj ? $authobj->authtypecode : ''; |
| 40 |
my $authority_type = Koha::Authority::Types->find($authtypecode); |
41 |
my $authority_type = Koha::Authority::Types->find($authtypecode); |
| 41 |
my $authtag = $authority_type->auth_tag_to_report; |
42 |
my $authtag = $authority_type->auth_tag_to_report; |
| 42 |
my $authfields = $authtag ? $record->field($authtag) : ''; |
43 |
my $authfields = $authtag ? $record->field($authtag) : ''; |
| 43 |
my $nameany = $input->param('nameany'); |
44 |
my $nameany = $input->param('nameany'); |
| 44 |
my $authorany = $input->param('authorany'); |
45 |
my $authorany = $input->param('authorany'); |
| 45 |
my $authorcorp = $input->param('authorcorp'); |
46 |
my $authorcorp = $input->param('authorcorp'); |
|
Lines 57-87
$page = $input->param('goto_page') if $input->param('changepage_goto');
Link Here
|
| 57 |
my $controlnumber = $input->param('controlnumber'); |
58 |
my $controlnumber = $input->param('controlnumber'); |
| 58 |
|
59 |
|
| 59 |
if (! $authorpersonal) { |
60 |
if (! $authorpersonal) { |
| 60 |
if ($authtag == 100) { |
61 |
if ($marcflavour eq 'MARC21' && $authtag == 100) { |
| 61 |
$authorpersonal = $authfields->subfield('a'); |
62 |
$authorpersonal = $authfields->subfield('a'); |
| 62 |
} elsif ($authtag == 200) { |
63 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 200) { |
| 63 |
$authorpersonal = $authfields->subfield('a'); |
64 |
$authorpersonal = $authfields->subfield('a'); |
| 64 |
} |
65 |
} |
| 65 |
} |
66 |
} |
| 66 |
|
67 |
|
| 67 |
if (! $authormeetingcon) { |
68 |
if (! $authormeetingcon) { |
| 68 |
if ($authtag == 110) { |
69 |
if ($marcflavour eq 'MARC21' && $authtag == 110) { |
| 69 |
$authormeetingcon = $authfields->subfield('a'); |
70 |
$authormeetingcon = $authfields->subfield('a'); |
| 70 |
} elsif ($authtag == 210) { |
71 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 210) { |
| 71 |
$authormeetingcon = $authfields->subfield('a'); |
72 |
$authormeetingcon = $authfields->subfield('a'); |
| 72 |
} |
73 |
} |
| 73 |
} |
74 |
} |
| 74 |
|
75 |
|
| 75 |
if (! $uniformtitle) { |
76 |
if (! $uniformtitle) { |
| 76 |
if ($authtag == 130) { |
77 |
if ($marcflavour eq 'MARC21' && $authtag == 130) { |
| 77 |
$uniformtitle = $authfields->subfield('a'); |
78 |
$uniformtitle = $authfields->subfield('a'); |
| 78 |
} elsif ($authtag == 230) { |
79 |
} elsif ($marcflavour eq 'UNIMARC' && $authtag == 230) { |
| 79 |
$uniformtitle = $authfields->subfield('a'); |
80 |
$uniformtitle = $authfields->subfield('a'); |
| 80 |
} |
81 |
} |
| 81 |
} |
82 |
} |
| 82 |
|
83 |
|
| 83 |
if (! $subject) { |
84 |
if (! $subject) { |
| 84 |
if ($authtag == 250) { |
85 |
if ($marcflavour eq 'UNIMARC' && $authtag == 250) { |
| 85 |
$subject = $authfields->subfield('a'); |
86 |
$subject = $authfields->subfield('a'); |
| 86 |
} |
87 |
} |
| 87 |
} |
88 |
} |
| 88 |
- |
|
|