subs renamed according to coding guidelines.
authortoins <toins>
Fri, 21 Jul 2006 10:10:29 +0000 (10:10 +0000)
committertoins <toins>
Fri, 21 Jul 2006 10:10:29 +0000 (10:10 +0000)
12 files changed:
C4/Auth.pm
C4/Koha.pm
admin/aqbookfund.pl
admin/aqbudget.pl
catalogue/moredetail.pl
cataloguing/additem-nomarc.pl
circ/branchtransfers.pl
circ/circulation.pl
circ/currenttransfers.pl
circ/returns.pl
circ/selectbranchprinter.pl
circ/waitingreservestransfers.pl

index c086619..70e20a0 100644 (file)
@@ -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 ) {
index eb9addc..41d6c88 100644 (file)
@@ -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;
index 03d2d11..ea5403b 100755 (executable)
@@ -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
index 689ee5d..5673a71 100755 (executable)
@@ -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 = {
index 629eb27..ac550ab 100755 (executable)
@@ -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;
index fb4df7a..e739a34 100755 (executable)
@@ -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
index ae97c6e..6d06b1d 100755 (executable)
@@ -39,7 +39,7 @@ my %env;
 my $linecolor1= 0;
 my $linecolor2= 1;
 
-my $branches = getbranches();
+my $branches = GetBranches();
 my $printers = getprinters(\%env);
 
 
index 082d70c..9fcd6e2 100755 (executable)
@@ -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);
 
index 4f0271a..6d3257f 100755 (executable)
@@ -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;
index d28ed7d..f8dbc74 100755 (executable)
@@ -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'};
index 12a4689..626659b 100644 (file)
@@ -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');
index ba94a98..5636e37 100755 (executable)
@@ -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;