koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha C4/Koha.pm C4/Members.pm reports/bor_issue... [rel_3_0]


From: Bruno Toumi
Subject: [Koha-cvs] koha C4/Koha.pm C4/Members.pm reports/bor_issue... [rel_3_0]
Date: Thu, 12 Oct 2006 13:41:47 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Bruno Toumi <btoumi>    06/10/12 13:41:47

Modified files:
        C4             : Koha.pm Members.pm 
        reports        : bor_issues_top.pl borrowers_out.pl 
                         cat_issues_top.pl 

Log message:
        delete function in koha.pm 
        use only one standard function to return list of category(with or 
without condition

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.40.2.10&r2=1.40.2.11
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Members.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.32.2.6&r2=1.32.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/reports/bor_issues_top.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.8.2.1&r2=1.8.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/reports/borrowers_out.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6&r2=1.6.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/reports/cat_issues_top.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.10.2.1&r2=1.10.2.2

Patches:
Index: C4/Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.40.2.10
retrieving revision 1.40.2.11
diff -u -b -r1.40.2.10 -r1.40.2.11
--- C4/Koha.pm  10 Oct 2006 16:24:57 -0000      1.40.2.10
+++ C4/Koha.pm  12 Oct 2006 13:41:47 -0000      1.40.2.11
@@ -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.40.2.10 2006/10/10 16:24:57 toins Exp $
+# $Id: Koha.pm,v 1.40.2.11 2006/10/12 13:41:47 btoumi Exp $
 
 use strict;
 require Exporter;
@@ -25,7 +25,7 @@
 use C4::Output;
 use vars qw($VERSION @ISA @EXPORT);
 
-$VERSION = do { my @v = '$Revision: 1.40.2.10 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
+$VERSION = do { my @v = '$Revision: 1.40.2.11 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
 
@@ -121,31 +121,6 @@
     return $data->{'name'};
 }
 
-=head2 borrowercategories
-
-  ($codes_arrayref, $labels_hashref) = &borrowercategories();
-
-Looks up the different types of borrowers in the database. Returns two
-elements: a reference-to-array, which lists the borrower category
-codes, and a reference-to-hash, which maps the borrower category codes
-to category descriptions.
-
-=cut
-#'
-
-sub borrowercategories {
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("Select categorycode,description from categories 
order by description");
-    $sth->execute;
-    my %labels;
-    my @codes;
-    while (my $data=$sth->fetchrow_hashref){
-      push @codes,$data->{'categorycode'};
-      $labels{$data->{'categorycode'}}=$data->{'description'};
-    }
-    $sth->finish;
-    return(address@hidden,\%labels);
-}
 
 =head2 ethnicitycategories
 

Index: C4/Members.pm
===================================================================
RCS file: /sources/koha/koha/C4/Members.pm,v
retrieving revision 1.32.2.6
retrieving revision 1.32.2.7
diff -u -b -r1.32.2.6 -r1.32.2.7
--- C4/Members.pm       12 Oct 2006 12:34:01 -0000      1.32.2.6
+++ C4/Members.pm       12 Oct 2006 13:41:47 -0000      1.32.2.7
@@ -19,7 +19,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Members.pm,v 1.32.2.6 2006/10/12 12:34:01 btoumi Exp $
+# $Id: Members.pm,v 1.32.2.7 2006/10/12 13:41:47 btoumi Exp $
 
 use strict;
 require Exporter;
@@ -31,7 +31,7 @@
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 
-$VERSION = do { my @v = '$Revision: 1.32.2.6 $' =~ /\d+/g; shift(@v) . "." . 
join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.32.2.7 $' =~ /\d+/g; shift(@v) . "." . 
join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -1224,10 +1224,15 @@
     my $dbh = C4::Context->dbh;
     my $request =qq|   SELECT categorycode,description 
                        FROM categories 
-                       WHERE category_type=? 
+                       $action
                        ORDER BY categorycode|;
     my $sth = $dbh->prepare($request);
-    $sth->execute($category_type);
+    if ($action){
+$sth->execute($category_type);
+}else{
+$sth->execute();
+}
+       
     my %labels;
     my @codes;
 

Index: reports/bor_issues_top.pl
===================================================================
RCS file: /sources/koha/koha/reports/bor_issues_top.pl,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -b -r1.8.2.1 -r1.8.2.2
--- reports/bor_issues_top.pl   31 Aug 2006 10:09:25 -0000      1.8.2.1
+++ reports/bor_issues_top.pl   12 Oct 2006 13:41:47 -0000      1.8.2.2
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: bor_issues_top.pl,v 1.8.2.1 2006/08/31 10:09:25 btoumi Exp $
+# $Id: bor_issues_top.pl,v 1.8.2.2 2006/10/12 13:41:47 btoumi Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -162,7 +162,7 @@
        }
        
        #borcat
-       my ($codes,$labels) = borrowercategories;
+       my ($codes,$labels) = GetborCatFromCatType(undef,undef);
        my @borcatloop;
        foreach my $thisborcat (sort keys %$labels) {
  #                     my $selected = 1 if $thisbranch eq $branch;

Index: reports/borrowers_out.pl
===================================================================
RCS file: /sources/koha/koha/reports/borrowers_out.pl,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -b -r1.6 -r1.6.2.1
--- reports/borrowers_out.pl    4 Jul 2006 14:36:52 -0000       1.6
+++ reports/borrowers_out.pl    12 Oct 2006 13:41:47 -0000      1.6.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: borrowers_out.pl,v 1.6 2006/07/04 14:36:52 toins Exp $
+# $Id: borrowers_out.pl,v 1.6.2.1 2006/10/12 13:41:47 btoumi Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -137,7 +137,7 @@
                                -size     => 1,
                                -multiple => 0 );
        
-       my ($codes,$labels) = borrowercategories;
+       my ($codes,$labels) = GetborCatFromCatType(undef,undef);
        my @borcatloop;
        foreach my $thisborcat (sort keys %$labels) {
  #                     my $selected = 1 if $thisbranch eq $branch;

Index: reports/cat_issues_top.pl
===================================================================
RCS file: /sources/koha/koha/reports/cat_issues_top.pl,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -b -r1.10.2.1 -r1.10.2.2
--- reports/cat_issues_top.pl   31 Aug 2006 10:09:25 -0000      1.10.2.1
+++ reports/cat_issues_top.pl   12 Oct 2006 13:41:47 -0000      1.10.2.2
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: cat_issues_top.pl,v 1.10.2.1 2006/08/31 10:09:25 btoumi Exp $
+# $Id: cat_issues_top.pl,v 1.10.2.2 2006/10/12 13:41:47 btoumi Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -163,7 +163,7 @@
        }
        
        #borcat
-       my ($codes,$labels) = borrowercategories;
+       my ($codes,$labels) = GetborCatFromCatType(undef,undef);
        my @borcatloop;
        foreach my $thisborcat (sort keys %$labels) {
  #                     my $selected = 1 if $thisbranch eq $branch;




reply via email to

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