# 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 ) {
@ISA = qw(Exporter);
@EXPORT = qw(
&subfield_is_koha_internal_p
- &getbranches &getbranch &getbranchdetail
+ &GetBranches &getbranch &getbranchdetail
&getprinters &getprinter
&GetItemTypes &getitemtypeinfo
get_itemtypeinfos_of
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
=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;
=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;
# 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
$sth->finish;
# filters
- my $branches = getbranches();
+ my $branches = GetBranches();
my @branchloop;
foreach my $branchcode (sort keys %{$branches}) {
my $row = {
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;
# 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
#
my @biblios;
my $biblioitemcount;
my @biblioitems;
-my $branchcount;
# my @branches;
# my %branchnames;
my $itemcount;
}
else {
( $biblioitemcount, @biblioitems ) = &getbiblioitembybiblionumber($biblionumber);
- my $branches = getbranches;
+ my $branches = GetBranches;
my @branchloop;
foreach my $thisbranch (sort keys %$branches) {
my %row =(value => $thisbranch,
( $biblioitemcount, @biblioitems ) =
&getbiblioitembybiblionumber($biblionumber);
- ( $branchcount, @branches ) = &branches;
+ @branches = &GetBranches;
( $itemtypecount, @itemtypes ) = &GetItemTypes;
for ( my $i = 0 ; $i < $itemtypecount ; $i++ ) {
$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
my $linecolor1= 0;
my $linecolor2= 1;
-my $branches = getbranches();
+my $branches = GetBranches();
my $printers = getprinters(\%env);
flagsrequired => { circulate => 1 },
}
);
-my $branches = getbranches();
+my $branches = GetBranches();
# my $printers = getprinters();
# my $printer = getprinter($query, $printers);
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;
my $linecolor1 = '#ffffcc';
my $linecolor2 = 'white';
-my $branches = getbranches('IS');
+my $branches = GetBranches('IS');
my $printers = getprinters( \%env );
my $branch = C4::Context->userenv->{'branch'};
# 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');
}
# get the all the branches for reference
-my $branches = getbranches();
+my $branches = GetBranches();
my @branchesloop;
foreach my $br (keys %$branches) {
my @reservloop;