Changing GetMarcStructure signature.
authorhdl <hdl>
Tue, 22 May 2007 08:50:47 +0000 (08:50 +0000)
committerhdl <hdl>
Tue, 22 May 2007 08:50:47 +0000 (08:50 +0000)
Deleting first parameter $dbh

C4/Biblio.pm
C4/Search.pm
catalogue/ISBDdetail.pl
catalogue/MARCdetail.pl
cataloguing/addbiblio.pl
cataloguing/additem.pl
circ/branchoverdues.pl
opac/opac-ISBDdetail.pl
opac/opac-MARCdetail.pl

index 08978d9..20c1507 100644 (file)
@@ -1415,10 +1415,9 @@ sub GetBiblioItemInfosOf {
 
 =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
 
@@ -1429,7 +1428,8 @@ $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';
@@ -2490,7 +2490,7 @@ sub PrepareItemrecordDisplay {
     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 =
@@ -3920,6 +3920,10 @@ Joshua Ferraro jmf@liblime.com
 
 # $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
index 2d15e7f..b5b76eb 100755 (executable)
@@ -74,7 +74,7 @@ This function modify the @$fields array and add related fields to search on.
 
 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 );
index 8993aa4..8650df6 100755 (executable)
@@ -86,7 +86,7 @@ my $dbh = C4::Context->dbh;
 
 my $biblionumber = $query->param('biblionumber');
 my $itemtype     = &GetFrameworkCode($biblionumber);
-my $tagslib      = &GetMarcStructure( $dbh, 1, $itemtype );
+my $tagslib      = &GetMarcStructure( 1, $itemtype );
 
 my $record = GetMarcBiblio($biblionumber);
 
index 9f9007f..b0854f0 100755 (executable)
@@ -100,7 +100,7 @@ my $popup        =
   ;    # 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);
 
@@ -295,7 +295,7 @@ foreach my $field (@fields) {
         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
index 4d43487..d0e1fac 100755 (executable)
@@ -505,7 +505,7 @@ my $framework=CGI::scrolling_list(
             -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);
index 606e67c..fddd30b 100755 (executable)
@@ -66,7 +66,7 @@ my $op = $input->param('op');
 # 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);
index 7fd09ed..2bb5402 100755 (executable)
@@ -107,7 +107,7 @@ my @getoverdues = GetOverduesForBranch( $default, $location );
 
 # 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);
index b46c51a..d133c70 100755 (executable)
@@ -62,7 +62,7 @@ my $dbh = C4::Context->dbh;
 
 my $biblionumber = $query->param('biblionumber');
 my $itemtype     = &GetFrameworkCode($biblionumber);
-my $tagslib      = &GetMarcStructure( $dbh, 1, $itemtype );
+my $tagslib      = &GetMarcStructure( 1, $itemtype );
 
 my $record = GetMarcBiblio($biblionumber);
 
index f945d4f..7381bfb 100755 (executable)
@@ -56,7 +56,7 @@ my $dbh = C4::Context->dbh;
 
 my $biblionumber = $query->param('biblionumber');
 my $itemtype     = &GetFrameworkCode($biblionumber);
-my $tagslib      = &GetMarcStructure( $dbh, 0, $itemtype );
+my $tagslib      = &GetMarcStructure( 0, $itemtype );
 
 my $record = GetMarcBiblio($biblionumber);