=over 4
-$res = GetMarcStructure($dbh,$forlibrarian,$frameworkcode);
+$res = GetMarcStructure($forlibrarian,$frameworkcode);
Returns a reference to a big hash of hash, with the Marc structure fro the given frameworkcode
-$dbh : DB handler
$forlibrarian :if set to 1, the MARC descriptions are the librarians ones, otherwise it's the public (OPAC) ones
$frameworkcode : the framework code to read
=cut
sub GetMarcStructure {
- my ( $dbh, $forlibrarian, $frameworkcode ) = @_;
+ my ( $forlibrarian, $frameworkcode ) = @_;
+ my $dbh=C4::Context->dbh;
$frameworkcode = "" unless $frameworkcode;
my $sth;
my $libfield = ( $forlibrarian eq 1 ) ? 'liblibrarian' : 'libopac';
my $frameworkcode = &GetFrameworkCode( $bibnum );
my ( $itemtagfield, $itemtagsubfield ) =
&GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
- my $tagslib = &GetMarcStructure( $dbh, 1, $frameworkcode );
+ my $tagslib = &GetMarcStructure( 1, $frameworkcode );
my $itemrecord = GetMarcItem( $bibnum, $itemnum) if ($itemnum);
my @loop_data;
my $authorised_values_sth =
# $Id$
# $Log$
+# Revision 1.207 2007/05/22 08:51:19 hdl
+# Changing GetMarcStructure signature.
+# Deleting first parameter $dbh
+#
# Revision 1.206 2007/05/21 08:44:17 btoumi
# add security when u delete biblio :
# u must delete linked items before delete biblio
sub findseealso {
my ( $dbh, $fields ) = @_;
- my $tagslib = GetMarcStructure( $dbh, 1 );
+ my $tagslib = GetMarcStructure( 1 );
for ( my $i = 0 ; $i <= $#{$fields} ; $i++ ) {
my ($tag) = substr( @$fields[$i], 1, 3 );
my ($subfield) = substr( @$fields[$i], 4, 1 );
my $biblionumber = $query->param('biblionumber');
my $itemtype = &GetFrameworkCode($biblionumber);
-my $tagslib = &GetMarcStructure( $dbh, 1, $itemtype );
+my $tagslib = &GetMarcStructure( 1, $itemtype );
my $record = GetMarcBiblio($biblionumber);
; # if set to 1, then don't insert links, it's just to show the biblio
my $subscriptionid = $query->param('subscriptionid');
-my $tagslib = &GetMarcStructure($dbh,1,$frameworkcode);
+my $tagslib = &GetMarcStructure(1,$frameworkcode);
my $record = GetMarcBiblio($biblionumber);
push( @big_array, \%this_row );
}
}
-my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField($dbh,"items.holdingbranch",$frameworkcode);
+my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$frameworkcode);
@big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} @big_array;
#fill big_row with missing datas
-multiple => 0 );
$template->param( framework => $framework, breedingid => $breedingid);
-$tagslib = &GetMarcStructure($dbh,1,$frameworkcode);
+$tagslib = &GetMarcStructure(1,$frameworkcode);
my $record=-1;
my $encoding="";
$record = GetMarcBiblio( $biblionumber ) if ($biblionumber);
# find itemtype
my $frameworkcode = &GetFrameworkCode($biblionumber);
-my $tagslib = &GetMarcStructure($dbh,1,$frameworkcode);
+my $tagslib = &GetMarcStructure(1,$frameworkcode);
my $record = GetMarcBiblio($biblionumber);
# warn "==>".$record->as_formatted;
my $oldrecord = TransformMarcToKoha($dbh,$record);
# search for location authorised value
my ($tag,$subfield) = GetMarcFromKohaField('items.location','');
-my $tagslib = &GetMarcStructure($dbh,1,'');
+my $tagslib = &GetMarcStructure(1,'');
if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
my $values= GetAuthorisedValues($tagslib->{$tag}->{$subfield}->{authorised_value});
$template->param(locationsloop => $values);
my $biblionumber = $query->param('biblionumber');
my $itemtype = &GetFrameworkCode($biblionumber);
-my $tagslib = &GetMarcStructure( $dbh, 1, $itemtype );
+my $tagslib = &GetMarcStructure( 1, $itemtype );
my $record = GetMarcBiblio($biblionumber);
my $biblionumber = $query->param('biblionumber');
my $itemtype = &GetFrameworkCode($biblionumber);
-my $tagslib = &GetMarcStructure( $dbh, 0, $itemtype );
+my $tagslib = &GetMarcStructure( 0, $itemtype );
my $record = GetMarcBiblio($biblionumber);