Lines 961-970
sub GetMarcStructure {
Link Here
|
961 |
} |
961 |
} |
962 |
|
962 |
|
963 |
$sth = $dbh->prepare( |
963 |
$sth = $dbh->prepare( |
964 |
"SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength,important |
964 |
"SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength,important, display_order |
965 |
FROM marc_subfield_structure |
965 |
FROM marc_subfield_structure |
966 |
WHERE frameworkcode=? |
966 |
WHERE frameworkcode=? |
967 |
ORDER BY tagfield,tagsubfield |
967 |
ORDER BY tagfield, tagsubfield |
968 |
" |
968 |
" |
969 |
); |
969 |
); |
970 |
|
970 |
|
Lines 981-996
sub GetMarcStructure {
Link Here
|
981 |
my $link; |
981 |
my $link; |
982 |
my $defaultvalue; |
982 |
my $defaultvalue; |
983 |
my $maxlength; |
983 |
my $maxlength; |
|
|
984 |
my $display_order; |
984 |
|
985 |
|
985 |
while ( |
986 |
while ( |
986 |
( $tag, $subfield, $liblibrarian, $libopac, $tab, $mandatory, $repeatable, $authorised_value, |
987 |
( $tag, $subfield, $liblibrarian, $libopac, $tab, $mandatory, $repeatable, $authorised_value, |
987 |
$authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue, |
988 |
$authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue, |
988 |
$maxlength, $important |
989 |
$maxlength, $important, $display_order |
989 |
) |
990 |
) |
990 |
= $sth->fetchrow |
991 |
= $sth->fetchrow |
991 |
) { |
992 |
) { |
992 |
$res->{$tag}->{$subfield}->{lib} = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac; |
993 |
$res->{$tag}->{$subfield}->{lib} = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac; |
993 |
$res->{$tag}->{$subfield}->{tab} = $tab; |
994 |
$res->{$tag}->{$subfield}->{tab} = $tab; |
|
|
995 |
$res->{$tag}->{$subfield}->{subfield} = $subfield; |
994 |
$res->{$tag}->{$subfield}->{mandatory} = $mandatory; |
996 |
$res->{$tag}->{$subfield}->{mandatory} = $mandatory; |
995 |
$res->{$tag}->{$subfield}->{important} = $important; |
997 |
$res->{$tag}->{$subfield}->{important} = $important; |
996 |
$res->{$tag}->{$subfield}->{repeatable} = $repeatable; |
998 |
$res->{$tag}->{$subfield}->{repeatable} = $repeatable; |
Lines 1004-1009
sub GetMarcStructure {
Link Here
|
1004 |
$res->{$tag}->{$subfield}->{'link'} = $link; |
1006 |
$res->{$tag}->{$subfield}->{'link'} = $link; |
1005 |
$res->{$tag}->{$subfield}->{defaultvalue} = $defaultvalue; |
1007 |
$res->{$tag}->{$subfield}->{defaultvalue} = $defaultvalue; |
1006 |
$res->{$tag}->{$subfield}->{maxlength} = $maxlength; |
1008 |
$res->{$tag}->{$subfield}->{maxlength} = $maxlength; |
|
|
1009 |
$res->{$tag}->{$subfield}->{display_order} = $display_order; |
1007 |
} |
1010 |
} |
1008 |
|
1011 |
|
1009 |
$cache->set_in_cache($cache_key, $res); |
1012 |
$cache->set_in_cache($cache_key, $res); |
Lines 1031-1037
sub GetUsedMarcStructure {
Link Here
|
1031 |
FROM marc_subfield_structure |
1034 |
FROM marc_subfield_structure |
1032 |
WHERE tab > -1 |
1035 |
WHERE tab > -1 |
1033 |
AND frameworkcode = ? |
1036 |
AND frameworkcode = ? |
1034 |
ORDER BY tagfield, tagsubfield |
1037 |
ORDER BY tagfield, display_order, tagsubfield |
1035 |
}; |
1038 |
}; |
1036 |
my $sth = C4::Context->dbh->prepare($query); |
1039 |
my $sth = C4::Context->dbh->prepare($query); |
1037 |
$sth->execute($frameworkcode); |
1040 |
$sth->execute($frameworkcode); |
Lines 1096-1102
sub GetMarcSubfieldStructure {
Link Here
|
1096 |
FROM marc_subfield_structure |
1099 |
FROM marc_subfield_structure |
1097 |
WHERE frameworkcode = ? |
1100 |
WHERE frameworkcode = ? |
1098 |
AND kohafield > '' |
1101 |
AND kohafield > '' |
1099 |
ORDER BY frameworkcode,tagfield,tagsubfield |
1102 |
ORDER BY frameworkcode, tagfield, display_order, tagsubfield |
1100 |
|, { Slice => {} }, $frameworkcode ); |
1103 |
|, { Slice => {} }, $frameworkcode ); |
1101 |
# Now map the output to a hash structure |
1104 |
# Now map the output to a hash structure |
1102 |
my $subfield_structure = {}; |
1105 |
my $subfield_structure = {}; |