Lines 947-956
sub GetMarcStructure {
Link Here
|
947 |
} |
947 |
} |
948 |
|
948 |
|
949 |
$sth = $dbh->prepare( |
949 |
$sth = $dbh->prepare( |
950 |
"SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength,important |
950 |
"SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength,important, display_order |
951 |
FROM marc_subfield_structure |
951 |
FROM marc_subfield_structure |
952 |
WHERE frameworkcode=? |
952 |
WHERE frameworkcode=? |
953 |
ORDER BY tagfield,tagsubfield |
953 |
ORDER BY tagfield, tagsubfield |
954 |
" |
954 |
" |
955 |
); |
955 |
); |
956 |
|
956 |
|
Lines 967-982
sub GetMarcStructure {
Link Here
|
967 |
my $link; |
967 |
my $link; |
968 |
my $defaultvalue; |
968 |
my $defaultvalue; |
969 |
my $maxlength; |
969 |
my $maxlength; |
|
|
970 |
my $display_order; |
970 |
|
971 |
|
971 |
while ( |
972 |
while ( |
972 |
( $tag, $subfield, $liblibrarian, $libopac, $tab, $mandatory, $repeatable, $authorised_value, |
973 |
( $tag, $subfield, $liblibrarian, $libopac, $tab, $mandatory, $repeatable, $authorised_value, |
973 |
$authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue, |
974 |
$authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue, |
974 |
$maxlength, $important |
975 |
$maxlength, $important, $display_order |
975 |
) |
976 |
) |
976 |
= $sth->fetchrow |
977 |
= $sth->fetchrow |
977 |
) { |
978 |
) { |
978 |
$res->{$tag}->{$subfield}->{lib} = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac; |
979 |
$res->{$tag}->{$subfield}->{lib} = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac; |
979 |
$res->{$tag}->{$subfield}->{tab} = $tab; |
980 |
$res->{$tag}->{$subfield}->{tab} = $tab; |
|
|
981 |
$res->{$tag}->{$subfield}->{subfield} = $subfield; |
980 |
$res->{$tag}->{$subfield}->{mandatory} = $mandatory; |
982 |
$res->{$tag}->{$subfield}->{mandatory} = $mandatory; |
981 |
$res->{$tag}->{$subfield}->{important} = $important; |
983 |
$res->{$tag}->{$subfield}->{important} = $important; |
982 |
$res->{$tag}->{$subfield}->{repeatable} = $repeatable; |
984 |
$res->{$tag}->{$subfield}->{repeatable} = $repeatable; |
Lines 990-995
sub GetMarcStructure {
Link Here
|
990 |
$res->{$tag}->{$subfield}->{'link'} = $link; |
992 |
$res->{$tag}->{$subfield}->{'link'} = $link; |
991 |
$res->{$tag}->{$subfield}->{defaultvalue} = $defaultvalue; |
993 |
$res->{$tag}->{$subfield}->{defaultvalue} = $defaultvalue; |
992 |
$res->{$tag}->{$subfield}->{maxlength} = $maxlength; |
994 |
$res->{$tag}->{$subfield}->{maxlength} = $maxlength; |
|
|
995 |
$res->{$tag}->{$subfield}->{display_order} = $display_order; |
993 |
} |
996 |
} |
994 |
|
997 |
|
995 |
$cache->set_in_cache($cache_key, $res); |
998 |
$cache->set_in_cache($cache_key, $res); |
Lines 1017-1023
sub GetUsedMarcStructure {
Link Here
|
1017 |
FROM marc_subfield_structure |
1020 |
FROM marc_subfield_structure |
1018 |
WHERE tab > -1 |
1021 |
WHERE tab > -1 |
1019 |
AND frameworkcode = ? |
1022 |
AND frameworkcode = ? |
1020 |
ORDER BY tagfield, tagsubfield |
1023 |
ORDER BY tagfield, display_order, tagsubfield |
1021 |
}; |
1024 |
}; |
1022 |
my $sth = C4::Context->dbh->prepare($query); |
1025 |
my $sth = C4::Context->dbh->prepare($query); |
1023 |
$sth->execute($frameworkcode); |
1026 |
$sth->execute($frameworkcode); |
Lines 1082-1088
sub GetMarcSubfieldStructure {
Link Here
|
1082 |
FROM marc_subfield_structure |
1085 |
FROM marc_subfield_structure |
1083 |
WHERE frameworkcode = ? |
1086 |
WHERE frameworkcode = ? |
1084 |
AND kohafield > '' |
1087 |
AND kohafield > '' |
1085 |
ORDER BY frameworkcode,tagfield,tagsubfield |
1088 |
ORDER BY frameworkcode, tagfield, display_order, tagsubfield |
1086 |
|, { Slice => {} }, $frameworkcode ); |
1089 |
|, { Slice => {} }, $frameworkcode ); |
1087 |
# Now map the output to a hash structure |
1090 |
# Now map the output to a hash structure |
1088 |
my $subfield_structure = {}; |
1091 |
my $subfield_structure = {}; |