[Koha-cvs] CVS: koha updatebiblio.pl,1.6,1.7

Henri-Damien LAURENT hdl at users.sourceforge.net
Fri Jan 10 23:21:56 CET 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv27124

Modified Files:
	updatebiblio.pl 
Log Message:
Templating : updatebiblio.pl updatebiblio.tmpl

Index: updatebiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/updatebiblio.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** updatebiblio.pl	13 Oct 2002 05:50:21 -0000	1.6
--- updatebiblio.pl	10 Jan 2003 22:21:50 -0000	1.7
***************
*** 19,26 ****
  # Suite 330, Boston, MA  02111-1307 USA
  
- use CGI;
  use strict;
  use C4::Acquisitions;
  use C4::Output;
  
  # FIXME - This script uses a bunch of functions that appear in both
--- 19,27 ----
  # Suite 330, Boston, MA  02111-1307 USA
  
  use strict;
+ use CGI;
  use C4::Acquisitions;
  use C4::Output;
+ use HTML::Template;
  
  # FIXME - This script uses a bunch of functions that appear in both
***************
*** 67,89 ****
  
  if ($error ne ''){
!     print $input->header;
!     print startpage();
!     print startmenu('catalogue');
!     print $error;
      my @subs=split('\n',$error);
-     print "<p> Click submit to force the subject";
      my @names=$input->param;
-     my %data;
      my $count=@names;
      for (my $i=0;$i<$count;$i++) {
  	if ($names[$i] ne 'Force') {
! 	    my $value=$input->param("$names[$i]");
! 	    $data{$names[$i]}="hidden\t$value\t$i";
  	} # if
      } # for
!     $data{"Force"}="hidden\t$subs[0]\t$count";
!     print mkform3('updatebiblio.pl',%data);
!     print endmenu();
!     print endpage();
  } else {
      print $input->redirect("detail.pl?type=intra&bib=$bibnum");
--- 68,89 ----
  
  if ($error ne ''){
! 	my $template = gettemplate("updatebiblio.tmpl");
! 
      my @subs=split('\n',$error);
      my @names=$input->param;
      my $count=@names;
+ 	my @dataloop;
      for (my $i=0;$i<$count;$i++) {
  	if ($names[$i] ne 'Force') {
! 		my %line;
! 	    $line{'value'}=$input->param("$names[$i]");
! 		$line{'name'}=$names[$i];
! 		push(@dataloop, \%line);
  	} # if
      } # for
!     template->param(substring =>$subs[0]);
!     template->param(error =>$error);
!     template->param(dataloop => \@dataloop);
! 	print "Content-Type: text/html\n\n", $template->output;
  } else {
      print $input->redirect("detail.pl?type=intra&bib=$bibnum");





More information about the Koha-cvs mailing list