|
Lines 68-86
my $bib_heading_fields;
Link Here
|
| 68 |
sub new { |
68 |
sub new { |
| 69 |
my $class = shift; |
69 |
my $class = shift; |
| 70 |
|
70 |
|
| 71 |
my $dbh = C4::Context->dbh; |
71 |
unless ( defined $bib_heading_fields ) { |
| 72 |
my $sth = $dbh->prepare( |
72 |
my $dbh = C4::Context->dbh; |
| 73 |
"SELECT tagfield, authtypecode |
73 |
my $sth = $dbh->prepare( |
| 74 |
FROM marc_subfield_structure |
74 |
"SELECT tagfield, authtypecode |
| 75 |
WHERE frameworkcode = '' AND authtypecode <> ''" |
75 |
FROM marc_subfield_structure |
| 76 |
); |
76 |
WHERE frameworkcode = '' AND authtypecode <> ''" |
| 77 |
$sth->execute(); |
77 |
); |
| 78 |
$bib_heading_fields = {}; |
78 |
$sth->execute(); |
| 79 |
while ( my ( $tag, $auth_type ) = $sth->fetchrow ) { |
79 |
$bib_heading_fields = {}; |
| 80 |
$bib_heading_fields->{$tag} = { |
80 |
while ( my ( $tag, $auth_type ) = $sth->fetchrow ) { |
| 81 |
auth_type => $auth_type, |
81 |
$bib_heading_fields->{$tag} = { |
| 82 |
subfields => 'abcdefghjklmnopqrstvxyz', |
82 |
auth_type => $auth_type, |
| 83 |
}; |
83 |
subfields => 'abcdefghjklmnopqrstvxyz', |
|
|
84 |
}; |
| 85 |
} |
| 84 |
} |
86 |
} |
| 85 |
|
87 |
|
| 86 |
return bless {}, $class; |
88 |
return bless {}, $class; |
| 87 |
- |
|
|