From 3c6410111b2c07339c7e29b604faa9a44c1d4ee1 Mon Sep 17 00:00:00 2001 From: toins Date: Fri, 21 Jul 2006 10:10:29 +0000 Subject: [PATCH] subs renamed according to coding guidelines. --- C4/Auth.pm | 2 +- C4/Koha.pm | 12 ++++++------ admin/aqbookfund.pl | 2 +- admin/aqbudget.pl | 2 +- catalogue/moredetail.pl | 2 +- cataloguing/additem-nomarc.pl | 10 ++++++---- circ/branchtransfers.pl | 2 +- circ/circulation.pl | 2 +- circ/currenttransfers.pl | 2 +- circ/returns.pl | 2 +- circ/selectbranchprinter.pl | 2 +- circ/waitingreservestransfers.pl | 2 +- 12 files changed, 22 insertions(+), 20 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index c086619a14..70e20a022b 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -490,7 +490,7 @@ sub checkauth { # new op dev : # launch a sequence to check if we have a ip for the branch, if we have one we replace the branchcode of the userenv by the branch bound in the ip. my $ip = $ENV{'REMOTE_ADDR'}; - my $branches = getbranches('IS'); + my $branches = GetBranches('IS'); my @branchesloop; my $branchprinter; foreach my $br ( keys %$branches ) { diff --git a/C4/Koha.pm b/C4/Koha.pm index eb9addc371..41d6c88796 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -49,7 +49,7 @@ Koha.pm provides many functions for Koha scripts. @ISA = qw(Exporter); @EXPORT = qw( &subfield_is_koha_internal_p - &getbranches &getbranch &getbranchdetail + &GetBranches &getbranch &getbranchdetail &getprinters &getprinter &GetItemTypes &getitemtypeinfo get_itemtypeinfos_of @@ -84,9 +84,9 @@ sub subfield_is_koha_internal_p ($) { return length $subfield != 1; } -=head2 getbranches +=head2 GetBranches - $branches = &getbranches(); + $branches = &GetBranches(); returns informations about branches. Create a branch selector with the following code Is branchIndependant sensitive @@ -94,7 +94,7 @@ sub subfield_is_koha_internal_p ($) { =head3 in PERL SCRIPT -my $branches = getbranches; +my $branches = GetBranches; my @branchloop; foreach my $thisbranch (sort keys %$branches) { my $selected = 1 if $thisbranch eq $branch; @@ -116,9 +116,9 @@ foreach my $thisbranch (sort keys %$branches) { =cut -sub getbranches { +sub GetBranches { # returns a reference to a hash of references to branches... - my ($type) = @_; + my ($type) = @_; my %branches; my $branch; my $dbh = C4::Context->dbh; diff --git a/admin/aqbookfund.pl b/admin/aqbookfund.pl index 03d2d11adb..ea5403bf6a 100755 --- a/admin/aqbookfund.pl +++ b/admin/aqbookfund.pl @@ -85,7 +85,7 @@ $template->param(action => $script_name); # my @select_branch; # my %select_branches; -my $branches = getbranches; +my $branches = GetBranches; ################## ADD_FORM ################################## # called by default. Used to create form to add or modify a record diff --git a/admin/aqbudget.pl b/admin/aqbudget.pl index 689ee5df41..5673a714f1 100755 --- a/admin/aqbudget.pl +++ b/admin/aqbudget.pl @@ -270,7 +270,7 @@ SELECT bookfundid, bookfundname $sth->finish; # filters - my $branches = getbranches(); + my $branches = GetBranches(); my @branchloop; foreach my $branchcode (sort keys %{$branches}) { my $row = { diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 629eb27f93..ac550ab9e0 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -71,7 +71,7 @@ my @results; my (@items)=itemissues($bi); my $count=@items; $data->{'count'}=$count; -my ($order,$ordernum)=getorder($bi,$biblionumber); +my ($order,$ordernum)=GetOrder($bi,$biblionumber); my $env; $env->{itemcount}=1; diff --git a/cataloguing/additem-nomarc.pl b/cataloguing/additem-nomarc.pl index fb4df7a4e9..e739a34368 100755 --- a/cataloguing/additem-nomarc.pl +++ b/cataloguing/additem-nomarc.pl @@ -20,6 +20,9 @@ # Suite 330, Boston, MA 02111-1307 USA # $Log$ +# Revision 1.3 2006/07/21 10:12:00 toins +# subs renamed according to coding guidelines. +# # Revision 1.2 2006/07/12 17:17:12 toins # getitemtypes renamed to GetItemTypes # @@ -64,7 +67,6 @@ my $bibliocount; my @biblios; my $biblioitemcount; my @biblioitems; -my $branchcount; # my @branches; # my %branchnames; my $itemcount; @@ -92,7 +94,7 @@ else { } else { ( $biblioitemcount, @biblioitems ) = &getbiblioitembybiblionumber($biblionumber); - my $branches = getbranches; + my $branches = GetBranches; my @branchloop; foreach my $thisbranch (sort keys %$branches) { my %row =(value => $thisbranch, @@ -147,7 +149,7 @@ else { ( $biblioitemcount, @biblioitems ) = &getbiblioitembybiblionumber($biblionumber); - ( $branchcount, @branches ) = &branches; + @branches = &GetBranches; ( $itemtypecount, @itemtypes ) = &GetItemTypes; for ( my $i = 0 ; $i < $itemtypecount ; $i++ ) { @@ -155,7 +157,7 @@ else { $itemtypes[$i]->{'description'}; } # for - for ( my $i = 0 ; $i < $branchcount ; $i++ ) { + for ( my $i = 0 ; $i < $#branches ; $i++ ) { $branchnames{ $branches[$i]->{'branchcode'} } = $branches[$i]->{'branchname'}; } # for diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index ae97c6e84c..6d06b1db58 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -39,7 +39,7 @@ my %env; my $linecolor1= 0; my $linecolor2= 1; -my $branches = getbranches(); +my $branches = GetBranches(); my $printers = getprinters(\%env); diff --git a/circ/circulation.pl b/circ/circulation.pl index 082d70c790..9fcd6e24f6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -54,7 +54,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( flagsrequired => { circulate => 1 }, } ); -my $branches = getbranches(); +my $branches = GetBranches(); # my $printers = getprinters(); # my $printer = getprinter($query, $printers); diff --git a/circ/currenttransfers.pl b/circ/currenttransfers.pl index 4f0271aa19..6d3257fcbb 100755 --- a/circ/currenttransfers.pl +++ b/circ/currenttransfers.pl @@ -59,7 +59,7 @@ my @datearr = localtime(time()); my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]); # get the all the branches for reference -my $branches = getbranches(); +my $branches = GetBranches(); my @branchesloop; foreach my $br (keys %$branches) { my @transferloop; diff --git a/circ/returns.pl b/circ/returns.pl index d28ed7d695..f8dbc7475a 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -57,7 +57,7 @@ my $headerbackgroundcolor = '#99cc33'; my $linecolor1 = '#ffffcc'; my $linecolor2 = 'white'; -my $branches = getbranches('IS'); +my $branches = GetBranches('IS'); my $printers = getprinters( \%env ); my $branch = C4::Context->userenv->{'branch'}; diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 12a46894a3..626659b8d5 100644 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -46,7 +46,7 @@ my $backgroundimage="/images/background-mem.gif"; # try to get the branch and printer settings from the http.... my %env; my $query=new CGI; -my $branches=getbranches('IS'); +my $branches=GetBranches('IS'); my $printers=getprinters(\%env); my $branch=$query->param('branch'); my $printer=$query->param('printer'); diff --git a/circ/waitingreservestransfers.pl b/circ/waitingreservestransfers.pl index ba94a9857c..5636e37746 100755 --- a/circ/waitingreservestransfers.pl +++ b/circ/waitingreservestransfers.pl @@ -61,7 +61,7 @@ if ($item){ } # get the all the branches for reference -my $branches = getbranches(); +my $branches = GetBranches(); my @branchesloop; foreach my $br (keys %$branches) { my @reservloop; -- 2.39.5