koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Koha.pm


From: Bruno Toumi
Subject: [Koha-cvs] koha/C4 Koha.pm
Date: Wed, 07 Jun 2006 07:50:04 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Bruno Toumi <btoumi>    06/06/07 07:50:04

Modified files:
        C4             : Koha.pm 

Log message:
        bug fix: syntax error in sub getbranches

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&r1=1.36&r2=1.37

Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- Koha.pm     6 Jun 2006 22:48:00 -0000       1.36
+++ Koha.pm     7 Jun 2006 07:50:04 -0000       1.37
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Koha.pm,v 1.36 2006/06/06 22:48:00 bob_lyon Exp $
+# $Id: Koha.pm,v 1.37 2006/06/07 07:50:04 btoumi Exp $
 
 use strict;
 require Exporter;
@@ -25,7 +25,7 @@
 
 use vars qw($VERSION @ISA @EXPORT);
 
-$VERSION = do { my @v = '$Revision: 1.36 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
+$VERSION = do { my @v = '$Revision: 1.37 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
 
@@ -120,6 +120,7 @@
 # returns a reference to a hash of references to branches...
         my ($type) = @_;
        my %branches;
+       my $branch;
        my $dbh = C4::Context->dbh;
        my $sth;
        if (C4::Context->preference("IndependantBranches") && 
(C4::Context->userenv->{flags}!=1)){
@@ -131,7 +132,7 @@
        $sth = $dbh->prepare("Select * from branches order by branchname");
        }
        $sth->execute;
-       while (my $branch=$sth->fetchrow_hashref) {
+       while ($branch=$sth->fetchrow_hashref) {
                my $nsth = $dbh->prepare("select categorycode from 
branchrelations where branchcode = ?");
                if ($type){
                    $nsth = $dbh->prepare("select categorycode from 
branchrelations where branchcode = ? and categorycode = ?");
@@ -158,7 +159,7 @@
                 if (!$type){
                    $branches{$branch->{'branchcode'}}=$branch;
                }
-       }
+
        return (\%branches);
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]