Lines 1114-1120
$frameworkcode : the framework code to read
Link Here
|
1114 |
|
1114 |
|
1115 |
sub GetMarcStructure { |
1115 |
sub GetMarcStructure { |
1116 |
my ( $forlibrarian, $frameworkcode ) = @_; |
1116 |
my ( $forlibrarian, $frameworkcode ) = @_; |
1117 |
my $dbh = C4::Context->dbh; |
|
|
1118 |
$frameworkcode = "" unless $frameworkcode; |
1117 |
$frameworkcode = "" unless $frameworkcode; |
1119 |
|
1118 |
|
1120 |
$forlibrarian = $forlibrarian ? 1 : 0; |
1119 |
$forlibrarian = $forlibrarian ? 1 : 0; |
Lines 1123-1128
sub GetMarcStructure {
Link Here
|
1123 |
my $cached = $cache->get_from_cache($cache_key); |
1122 |
my $cached = $cache->get_from_cache($cache_key); |
1124 |
return $cached if $cached; |
1123 |
return $cached if $cached; |
1125 |
|
1124 |
|
|
|
1125 |
my $dbh = C4::Context->dbh; |
1126 |
my $sth = $dbh->prepare( |
1126 |
my $sth = $dbh->prepare( |
1127 |
"SELECT tagfield,liblibrarian,libopac,mandatory,repeatable |
1127 |
"SELECT tagfield,liblibrarian,libopac,mandatory,repeatable |
1128 |
FROM marc_tag_structure |
1128 |
FROM marc_tag_structure |
Lines 1667-1673
descriptions rather than normal ones when they exist.
Link Here
|
1667 |
|
1667 |
|
1668 |
sub GetAuthorisedValueDesc { |
1668 |
sub GetAuthorisedValueDesc { |
1669 |
my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_; |
1669 |
my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_; |
1670 |
my $dbh = C4::Context->dbh; |
|
|
1671 |
|
1670 |
|
1672 |
if ( !$category ) { |
1671 |
if ( !$category ) { |
1673 |
|
1672 |
|
Lines 1687-1692
sub GetAuthorisedValueDesc {
Link Here
|
1687 |
$category = $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
1686 |
$category = $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
1688 |
} |
1687 |
} |
1689 |
|
1688 |
|
|
|
1689 |
my $dbh = C4::Context->dbh; |
1690 |
if ( $category ne "" ) { |
1690 |
if ( $category ne "" ) { |
1691 |
my $sth = $dbh->prepare( "SELECT lib, lib_opac FROM authorised_values WHERE category = ? AND authorised_value = ?" ); |
1691 |
my $sth = $dbh->prepare( "SELECT lib, lib_opac FROM authorised_values WHERE category = ? AND authorised_value = ?" ); |
1692 |
$sth->execute( $category, $value ); |
1692 |
$sth->execute( $category, $value ); |
Lines 2618-2623
hash_ref
Link Here
|
2618 |
|
2618 |
|
2619 |
sub TransformMarcToKoha { |
2619 |
sub TransformMarcToKoha { |
2620 |
my ( $dbh, $record, $frameworkcode, $limit_table ) = @_; |
2620 |
my ( $dbh, $record, $frameworkcode, $limit_table ) = @_; |
|
|
2621 |
## FIXME: $dbh parameter is never used inside this subroutine ??? |
2621 |
|
2622 |
|
2622 |
my $result = {}; |
2623 |
my $result = {}; |
2623 |
if (!defined $record) { |
2624 |
if (!defined $record) { |
2624 |
- |
|
|