[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Koha.pm,1.25,1.26
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Koha.pm,1.25,1.26 |
Date: |
Thu, 27 Oct 2005 05:06:00 -0700 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7330/C4
Modified Files:
Koha.pm
Log Message:
road to normalization : changing API = removing getbranchname, replaced by
getbranchdetail (should be getbranch, but this sub already exists and I don't
understand what it does...)
Index: Koha.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Koha.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** Koha.pm 26 Oct 2005 09:12:33 -0000 1.25
--- Koha.pm 27 Oct 2005 12:05:58 -0000 1.26
***************
*** 56,60 ****
ðnicitycategories
&subfield_is_koha_internal_p
! &getbranches &getbranch &getbranchname
&getprinters &getprinter
&getitemtypes &getitemtypeinfo
--- 56,60 ----
ðnicitycategories
&subfield_is_koha_internal_p
! &getbranches &getbranch &getbranchdetail
&getprinters &getprinter
&getitemtypes &getitemtypeinfo
***************
*** 469,475 ****
}
! =item getbranchname
! $branchname = &getbranchname($branchcode);
Given the branch code, the function returns the corresponding
--- 469,475 ----
}
! =item getbranchdetail
! $branchname = &getbranchdetail($branchcode);
Given the branch code, the function returns the corresponding
***************
*** 478,492 ****
=cut
! sub getbranchname
{
my ($branchcode) = @_;
my $dbh = C4::Context->dbh;
! my $sth = $dbh->prepare("SELECT branchname FROM branches WHERE
branchcode = ?");
$sth->execute($branchcode);
! my $branchname = $sth->fetchrow();
$sth->finish();
return $branchname;
} # sub getbranchname
sub getprinter ($$) {
my($query, $printers) = @_; # get printer for this query from printers
--- 478,493 ----
=cut
! sub getbranchdetail
{
my ($branchcode) = @_;
my $dbh = C4::Context->dbh;
! my $sth = $dbh->prepare("SELECT * FROM branches WHERE branchcode = ?");
$sth->execute($branchcode);
! my $branchname = $sth->fetchrow_hashref();
$sth->finish();
return $branchname;
} # sub getbranchname
+
sub getprinter ($$) {
my($query, $printers) = @_; # get printer for this query from printers
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Koha.pm,1.25,1.26,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.23,1.115.2.24
- Next by Date:
[Koha-cvs] CVS: koha/opac opac-ISBDdetail.pl,1.9,1.10 opac-MARCdetail.pl,1.8,1.9
- Previous by thread:
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.23,1.115.2.24
- Next by thread:
[Koha-cvs] CVS: koha/opac opac-ISBDdetail.pl,1.9,1.10 opac-MARCdetail.pl,1.8,1.9
- Index(es):