[Koha-cvs] CVS: koha boraccount.pl,1.10,1.11 detail.pl,1.26,1.27 detailprint.pl,1.2,1.3 ISBDdetail.pl,1.6,1.7 mancredit.pl,1.10,1.11 maninvoice.pl,1.8,1.9 MARCdetail.pl,1.31,1.32 modbibitem.pl,1.15,1.16 modbib.pl,1.14,1.15 moditem.pl,1.8,1.9 modrequest.pl,1.6,1.7 modwebsites.pl,1.4,1.5 pay.pl,1.12,1.13 placerequest.pl,1.4,1.5 readingrec.pl,1.13,1.14 request.pl,1.30,1.31

Paul POULAIN tipaul at users.sourceforge.net
Thu Sep 22 12:01:49 CEST 2005


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6231

Modified Files:
	boraccount.pl detail.pl detailprint.pl ISBDdetail.pl 
	mancredit.pl maninvoice.pl MARCdetail.pl modbibitem.pl 
	modbib.pl moditem.pl modrequest.pl modwebsites.pl pay.pl 
	placerequest.pl readingrec.pl request.pl 
Log Message:
see mail on koha-devel : code cleaning on Search.pm + normalizing API + use of biblionumber everywhere (instead of bn, biblio, ...)

Index: boraccount.pl
===================================================================
RCS file: /cvsroot/koha/koha/boraccount.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** boraccount.pl	1 Mar 2005 13:40:47 -0000	1.10
--- boraccount.pl	22 Sep 2005 10:01:46 -0000	1.11
***************
*** 30,34 ****
  use C4::Date;
  use CGI;
! use C4::Search;
  use HTML::Template;
  
--- 30,34 ----
  use C4::Date;
  use CGI;
! use C4::Members;
  use HTML::Template;
  

Index: detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/detail.pl,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** detail.pl	9 Aug 2005 14:10:32 -0000	1.26
--- detail.pl	22 Sep 2005 10:01:46 -0000	1.27
***************
*** 3,7 ****
  require Exporter;
  use CGI;
- use C4::Search;
  use C4::Auth;
  use C4::Bull; #uses getsubscriptionfrom biblionumber
--- 3,6 ----
***************
*** 27,31 ****
  my @items                                 = &ItemInfo(undef, $biblionumber, 'intra');
  my $dat                                   = &bibdata($biblionumber);
! my ($authorcount, $addauthor)             = &addauthor($biblionumber);
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);
--- 26,30 ----
  my @items                                 = &ItemInfo(undef, $biblionumber, 'intra');
  my $dat                                   = &bibdata($biblionumber);
! my ($authorcount, $addauthor)             = &getaddauthor($biblionumber);
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);

Index: detailprint.pl
===================================================================
RCS file: /cvsroot/koha/koha/detailprint.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** detailprint.pl	11 Feb 2004 08:35:31 -0000	1.2
--- detailprint.pl	22 Sep 2005 10:01:46 -0000	1.3
***************
*** 25,30 ****
  use C4::Output;  # contains gettemplate
  use CGI;
- use C4::Search;
  use C4::Auth;
  use C4::Interface::CGI::Output;
  use C4::Date;
--- 25,30 ----
  use C4::Output;  # contains gettemplate
  use CGI;
  use C4::Auth;
+ use C4::Biblio;
  use C4::Interface::CGI::Output;
  use C4::Date;
***************
*** 46,50 ****
  
  my $dat=bibdata($biblionumber);
! my ($authorcount, $addauthor)= &addauthor($biblionumber);
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);
--- 46,50 ----
  
  my $dat=bibdata($biblionumber);
! my ($authorcount, $addauthor)= &getaddauthor($biblionumber);
  my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
  my ($websitecount, @websites)             = &getwebsites($biblionumber);

Index: ISBDdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/ISBDdetail.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** ISBDdetail.pl	9 Aug 2005 14:10:34 -0000	1.6
--- ISBDdetail.pl	22 Sep 2005 10:01:46 -0000	1.7
***************
*** 138,142 ****
     #---- itemtypes
     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
!        return ItemType($value);
      }
  
--- 138,143 ----
     #---- itemtypes
     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
!    		my $itemtypedef = getitemtypeinfo($itemtype);
!        return $itemtypedef->{description};
      }
  

Index: mancredit.pl
===================================================================
RCS file: /cvsroot/koha/koha/mancredit.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** mancredit.pl	23 Apr 2003 12:20:26 -0000	1.10
--- mancredit.pl	22 Sep 2005 10:01:46 -0000	1.11
***************
*** 28,32 ****
  use CGI;
  use HTML::Template;
! use C4::Search;
  use C4::Accounts2;
  my $input=new CGI;
--- 28,32 ----
  use CGI;
  use HTML::Template;
! use C4::Members;
  use C4::Accounts2;
  my $input=new CGI;

Index: maninvoice.pl
===================================================================
RCS file: /cvsroot/koha/koha/maninvoice.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** maninvoice.pl	23 Apr 2003 12:20:27 -0000	1.8
--- maninvoice.pl	22 Sep 2005 10:01:46 -0000	1.9
***************
*** 27,31 ****
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Search;
  use C4::Accounts2;
  use HTML::Template;
--- 27,31 ----
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Members;
  use C4::Accounts2;
  use HTML::Template;

Index: MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/MARCdetail.pl,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** MARCdetail.pl	11 Aug 2005 09:00:46 -0000	1.31
--- MARCdetail.pl	22 Sep 2005 10:01:46 -0000	1.32
***************
*** 53,57 ****
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Search;
  use MARC::Record;
  use C4::Biblio;
--- 53,57 ----
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Koha;
  use MARC::Record;
  use C4::Biblio;
***************
*** 241,245 ****
     #---- itemtypes
     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
!        return ItemType($value);
      }
  
--- 241,246 ----
     #---- itemtypes
     if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
!    		my $itemtypedef = getitemtypeinfo($itemtype);
!        return $itemtypedef->{description};
      }
  

Index: modbibitem.pl
===================================================================
RCS file: /cvsroot/koha/koha/modbibitem.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** modbibitem.pl	29 Jun 2005 00:05:21 -0000	1.15
--- modbibitem.pl	22 Sep 2005 10:01:46 -0000	1.16
***************
*** 29,33 ****
  require Exporter;
  
- use C4::Search;
  use C4::Output;
  use C4::Koha;
--- 29,32 ----

Index: modbib.pl
===================================================================
RCS file: /cvsroot/koha/koha/modbib.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** modbib.pl	15 Jul 2003 11:34:52 -0000	1.14
--- modbib.pl	22 Sep 2005 10:01:46 -0000	1.15
***************
*** 4,11 ****
  
  #script to modify/delete biblios
- #written 8/11/99
- # modified 11/11/99 by chris at katipo.co.nz
- # modified 12/16/2002 by hdl at ifrance.com : templating
- 
  
  # Copyright 2000-2002 Katipo Communications
--- 4,7 ----
***************
*** 28,32 ****
  use strict;
  
! use C4::Search;
  use CGI;
  use C4::Output;
--- 24,28 ----
  use strict;
  
! use C4::Biblio;
  use CGI;
  use C4::Output;
***************
*** 40,46 ****
  my $bibnum=$input->param('bibnum');
  my $data=&bibdata($bibnum);
! my ($subjectcount, $subject)     = &subject($bibnum);
! my ($subtitlecount, $subtitle)   = &subtitle($bibnum);
! my ($addauthorcount, $addauthor) = &addauthor($bibnum);
  my $sub        = $subject->[0]->{'subject'};
  my $additional = $addauthor->[0]->{'author'};
--- 36,42 ----
  my $bibnum=$input->param('bibnum');
  my $data=&bibdata($bibnum);
! my ($subjectcount, $subject)     = &getsubject($bibnum);
! my ($subtitlecount, $subtitle)   = &getsubtitle($bibnum);
! my ($addauthorcount, $addauthor) = &getaddauthor($bibnum);
  my $sub        = $subject->[0]->{'subject'};
  my $additional = $addauthor->[0]->{'author'};

Index: moditem.pl
===================================================================
RCS file: /cvsroot/koha/koha/moditem.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** moditem.pl	13 Jul 2004 12:55:01 -0000	1.8
--- moditem.pl	22 Sep 2005 10:01:46 -0000	1.9
***************
*** 50,54 ****
  my $data=bibitemdata($bibitemnum);
  
! my $item=itemnodata('blah','',$itemnum);
  #my ($analytictitle)=analytic($biblionumber,'t');
  #my ($analyticauthor)=analytic($biblionumber,'a');
--- 50,54 ----
  my $data=bibitemdata($bibitemnum);
  
! my $item=getbibliofromitemnumber('blah','',$itemnum);
  #my ($analytictitle)=analytic($biblionumber,'t');
  #my ($analyticauthor)=analytic($biblionumber,'a');

Index: modrequest.pl
===================================================================
RCS file: /cvsroot/koha/koha/modrequest.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** modrequest.pl	21 Jun 2004 21:40:33 -0000	1.6
--- modrequest.pl	22 Sep 2005 10:01:46 -0000	1.7
***************
*** 36,40 ****
  
  my @rank=$input->param('rank-request');
! my @biblio=$input->param('biblio');
  my @borrower=$input->param('borrowernumber');
  my @branch=$input->param('pickup');
--- 36,40 ----
  
  my @rank=$input->param('rank-request');
! my @biblionumber=$input->param('biblionumber');
  my @borrower=$input->param('borrowernumber');
  my @branch=$input->param('pickup');
***************
*** 44,48 ****
  # no attempt is made to check consistency.
  for (my $i=0;$i<$count;$i++){
!     UpdateReserve($rank[$i],$biblio[$i],$borrower[$i],$branch[$i]); #from C4::Reserves2
  }
  
--- 44,48 ----
  # no attempt is made to check consistency.
  for (my $i=0;$i<$count;$i++){
!     UpdateReserve($rank[$i],$biblionumber[$i],$borrower[$i],$branch[$i]); #from C4::Reserves2
  }
  
***************
*** 51,54 ****
    print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrower[0]");
   } else {
!    print $input->redirect("/cgi-bin/koha/request.pl?bib=$biblio[0]");
  }
--- 51,54 ----
    print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrower[0]");
   } else {
!    print $input->redirect("/cgi-bin/koha/request.pl?biblionumber=$biblionumber[0]");
  }

Index: modwebsites.pl
===================================================================
RCS file: /cvsroot/koha/koha/modwebsites.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** modwebsites.pl	21 Apr 2003 03:40:05 -0000	1.4
--- modwebsites.pl	22 Sep 2005 10:01:46 -0000	1.5
***************
*** 23,27 ****
  use strict;
  
! use C4::Search;
  use CGI;
  use C4::Output;
--- 23,27 ----
  use strict;
  
! use C4::Biblio;
  use CGI;
  use C4::Output;

Index: pay.pl
===================================================================
RCS file: /cvsroot/koha/koha/pay.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** pay.pl	20 Jun 2005 14:39:01 -0000	1.12
--- pay.pl	22 Sep 2005 10:01:46 -0000	1.13
***************
*** 31,35 ****
  use C4::Output;
  use CGI;
! use C4::Search;
  use C4::Accounts2;
  use C4::Stats;
--- 31,35 ----
  use C4::Output;
  use CGI;
! use C4::Members;
  use C4::Accounts2;
  use C4::Stats;

Index: placerequest.pl
===================================================================
RCS file: /cvsroot/koha/koha/placerequest.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** placerequest.pl	15 Jan 2003 03:12:22 -0000	1.4
--- placerequest.pl	22 Sep 2005 10:01:46 -0000	1.5
***************
*** 24,31 ****
  use strict;
  #use DBI;
! use C4::Search;
  use CGI;
  use C4::Output;
  use C4::Reserves2;
  
  my $input = new CGI;
--- 24,32 ----
  use strict;
  #use DBI;
! use C4::Biblio;
  use CGI;
  use C4::Output;
  use C4::Reserves2;
+ use C4::Members;
  
  my $input = new CGI;
***************
*** 34,38 ****
  my @bibitems=$input->param('biblioitem');
  my @reqbib=$input->param('reqbib');
! my $biblio=$input->param('biblio');
  my $borrower=$input->param('member');
  my $notes=$input->param('notes');
--- 35,39 ----
  my @bibitems=$input->param('biblioitem');
  my @reqbib=$input->param('reqbib');
! my $biblionumber=$input->param('biblionumber');
  my $borrower=$input->param('member');
  my $notes=$input->param('notes');
***************
*** 43,77 ****
  my $bornum=borrdata($borrower,'');
  if ($type eq 'str8' && $bornum ne ''){
!     my $count=@bibitems;
!     @bibitems=sort @bibitems;
!     my $i2=1;
!     my @realbi;
!     $realbi[0]=$bibitems[0];
! for (my $i=1;$i<$count;$i++){
!     my $i3=$i2-1;
!     if ($realbi[$i3] ne $bibitems[$i]){
! 	$realbi[$i2]=$bibitems[$i];
! 	$i2++;
!     }
! }
! 
! my $env;
! 
! my $const;
! if ($input->param('request') eq 'any'){
!   $const='a';
!   CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,$const,\@realbi,$rank[0],$notes,$title);
! } elsif ($reqbib[0] ne ''){
!   $const='o';
!   CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,$const,\@reqbib,$rank[0],$notes,$title);
! } else {
!   CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblio,'a',\@realbi,$rank[0],$notes,$title);
! }
! #print @realbi;
! 
! print $input->redirect("request.pl?bib=$biblio");
  } elsif ($bornum eq ''){
!   print $input->header();
!   print "Invalid card number please try again";
!   print $input->Dump;
  }
--- 44,75 ----
  my $bornum=borrdata($borrower,'');
  if ($type eq 'str8' && $bornum ne ''){
! 	my $count=@bibitems;
! 	@bibitems=sort @bibitems;
! 	my $i2=1;
! 	my @realbi;
! 	$realbi[0]=$bibitems[0];
! 	for (my $i=1;$i<$count;$i++) {
! 		my $i3=$i2-1;
! 		if ($realbi[$i3] ne $bibitems[$i]) {
! 			$realbi[$i2]=$bibitems[$i];
! 			$i2++;
! 		}
! 	}
! 	my $env;
! 	my $const;
! 	if ($input->param('request') eq 'any'){
! 	$const='a';
! 	CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblionumber,$const,\@realbi,$rank[0],$notes,$title);
! 	} elsif ($reqbib[0] ne ''){
! 	$const='o';
! 	CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblionumber,$const,\@reqbib,$rank[0],$notes,$title);
! 	} else {
! 	CreateReserve(\$env,$branch,$bornum->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$notes,$title);
! 	}
! 	
! 	print $input->redirect("request.pl?biblionumber=$biblionumber");
  } elsif ($bornum eq ''){
! 	print $input->header();
! 	print "Invalid card number please try again";
! 	print $input->Dump;
  }

Index: readingrec.pl
===================================================================
RCS file: /cvsroot/koha/koha/readingrec.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** readingrec.pl	9 Feb 2005 20:59:18 -0000	1.13
--- readingrec.pl	22 Sep 2005 10:01:46 -0000	1.14
***************
*** 28,32 ****
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Search;
  use HTML::Template;
  use C4::Date;
--- 28,32 ----
  use C4::Interface::CGI::Output;
  use CGI;
! use C4::Members;
  use HTML::Template;
  use C4::Date;

Index: request.pl
===================================================================
RCS file: /cvsroot/koha/koha/request.pl,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** request.pl	1 Mar 2005 13:40:47 -0000	1.30
--- request.pl	22 Sep 2005 10:01:46 -0000	1.31
***************
*** 25,29 ****
  
  use strict;
- use C4::Search;
  use C4::Output;
  use C4::Interface::CGI::Output;
--- 25,28 ----
***************
*** 41,49 ****
  
  # get biblio information....
! my $bib = $input->param('bib');
! my $dat = bibdata($bib);
  
  # get existing reserves .....
! my ($count,$reserves) = FindReserves($bib);
  my $totalcount = $count;
  foreach my $res (@$reserves) {
--- 40,48 ----
  
  # get biblio information....
! my $biblionumber = $input->param('biblionumber');
! my $dat = bibdata($biblionumber);
  
  # get existing reserves .....
! my ($count,$reserves) = FindReserves($biblionumber);
  my $totalcount = $count;
  foreach my $res (@$reserves) {
***************
*** 73,77 ****
  
  # get biblioitem information and build rows for form
! my ($count2, at data) = bibitems($bib);
  
  my @bibitemloop;
--- 72,76 ----
  
  # get biblioitem information and build rows for form
! my ($count2, at data) = bibitems($biblionumber);
  
  my @bibitemloop;
***************
*** 165,183 ****
  my @select_branch;
  my %select_branches;
! my ($count2, at branches)=branches();
! for (my $i=0;$i<$count2;$i++){
! 	push @select_branch, $branches[$i]->{'branchcode'};#
! 	$select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
  }
- my $CGIbranch=CGI::scrolling_list( -name     => 'pickup',
- 			-values   => \@select_branch,
- 			-labels   => \%select_branches,
- 			-size     => 1,
- 			-multiple => 0 );
  
  #get the time for the form name...
  my $time = time();
  
- #setup colours
  my ($template, $borrowernumber, $cookie)
      = get_template_and_user({template_name => "request.tmpl",
--- 164,179 ----
  my @select_branch;
  my %select_branches;
! my ($count2, at branches)=getbranches();
! my @branchloop;
! foreach my $thisbranch (sort keys %$branches) {
! 	my %row =(value => $thisbranch,
! 				branchname => $branches->{$thisbranch}->{'branchname'},
! 			);
! 	push @branchloop, \%row;
  }
  
  #get the time for the form name...
  my $time = time();
  
  my ($template, $borrowernumber, $cookie)
      = get_template_and_user({template_name => "request.tmpl",
***************
*** 188,197 ****
                           });
  $template->param(	optionloop =>\@optionloop,
! 								CGIbranch => $CGIbranch,
  								reserveloop => \@reserveloop,
  								'time' => $time,
  								bibitemloop => \@bibitemloop,
  								date => $date,
! 								bib => $bib,
  								title =>$dat->{title});
  # printout the page
--- 184,193 ----
                           });
  $template->param(	optionloop =>\@optionloop,
! 								branchloop => \@branchloop,
  								reserveloop => \@reserveloop,
  								'time' => $time,
  								bibitemloop => \@bibitemloop,
  								date => $date,
! 								biblionumber => $biblionumber,
  								title =>$dat->{title});
  # printout the page





More information about the Koha-cvs mailing list