X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=cataloguing%2Fvalue_builder%2Funimarc_field_105.pl;h=e33e1280a7fdafc5d5baf5fa132cec9388a31522;hb=fdb0968beaa30bd6f921737fc7f4fa42befc1c6e;hp=c231aa540b3a2b4b387f0ba00a8d633216a09caf;hpb=f8e9fb6445dadbdef91e13a253c9c6bcb75e0eec;p=koha.git diff --git a/cataloguing/value_builder/unimarc_field_105.pl b/cataloguing/value_builder/unimarc_field_105.pl index c231aa540b..e33e1280a7 100755 --- a/cataloguing/value_builder/unimarc_field_105.pl +++ b/cataloguing/value_builder/unimarc_field_105.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl -# $Id$ # Copyright 2000-2002 Katipo Communications # @@ -32,45 +31,43 @@ use C4::Output; plugin_parameters : other parameters added when the plugin is called by the dopop function =cut + sub plugin_parameters { -my ($dbh,$record,$tagslib,$i,$tabloop) = @_; -return ""; + my ($dbh,$record,$tagslib,$i,$tabloop) = @_; + return ""; } sub plugin_javascript { -my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; -my $function_name= "105".(int(rand(100000))+1); -my $res=" - + "; + + return ($field_number,$res); } - -"; -return ($function_name,$res); -} sub plugin { -my ($input) = @_; - my %env; - -# my $input = new CGI; - my $index= $input->param('index'); - my $result= $input->param('result'); + my ($input) = @_; + my $index= $input->param('index'); + my $result= $input->param('result'); - my $dbh = C4::Context->dbh; -my ($template, $loggedinuser, $cookie) + my $dbh = C4::Context->dbh; + my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "cataloguing/value_builder/unimarc_field_105.tmpl", query => $input, type => "intranet", @@ -93,22 +90,23 @@ my ($template, $loggedinuser, $cookie) my $f11 = substr($result,10,1); my $f12 = substr($result,11,1); my $f13 = substr($result,12,1); + $template->param(index => $index, - "f1$f1" => 1, - "f2$f2" => 1, - "f3$f3" => 1, - "f4$f4" => 1, - "f5$f5" => 1, - "f6$f6" => 1, - "f7$f7" => 1, - "f8$f8" => 1, - "f9$f9" => 1, - "f10$f10" => 1, - "f11$f11" => 1, - "f12$f12" => 1, - "f13$f13" => 1 - ); - print $input->header(-cookie => $cookie),$template->output; + "f1$f1" => 1, + "f2$f2" => 1, + "f3$f3" => 1, + "f4$f4" => 1, + "f5$f5" => 1, + "f6$f6" => 1, + "f7$f7" => 1, + "f8$f8" => 1, + "f9$f9" => 1, + "f10$f10" => 1, + "f11$f11" => 1, + "f12$f12" => 1, + "f13$f13" => 1 + ); + output_html_with_http_headers $input, $cookie, $template->output; } 1;