From 286930bdc772bf6993dc0db75be15fbadaa26c77 Mon Sep 17 00:00:00 2001 From: hdl Date: Tue, 22 May 2007 08:50:47 +0000 Subject: [PATCH] Changing GetMarcStructure signature. Deleting first parameter $dbh --- C4/Biblio.pm | 12 ++++++++---- C4/Search.pm | 2 +- catalogue/ISBDdetail.pl | 2 +- catalogue/MARCdetail.pl | 4 ++-- cataloguing/addbiblio.pl | 2 +- cataloguing/additem.pl | 2 +- circ/branchoverdues.pl | 2 +- opac/opac-ISBDdetail.pl | 2 +- opac/opac-MARCdetail.pl | 2 +- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 08978d961f..20c1507111 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -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 diff --git a/C4/Search.pm b/C4/Search.pm index 2d15e7f604..b5b76eb72a 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -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 ); diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index 8993aa4388..8650df6492 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -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); diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 9f9007fc98..b0854f0472 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -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 diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 4d43487fa6..d0e1fac8dd 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -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); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 606e67c517..fddd30b0f1 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -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); diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index 7fd09edfae..2bb540204c 100755 --- a/circ/branchoverdues.pl +++ b/circ/branchoverdues.pl @@ -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); diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index b46c51ad84..d133c70a5f 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -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); diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index f945d4ffb1..7381bfbd23 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -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); -- 2.20.1