moving fields around toCVS: ----------------------------------------------------...
[koha_fer] / circ / selectbranchprinter.pl
index 147bce5..737556c 100644 (file)
@@ -28,6 +28,7 @@ use C4::Print;
 use C4::Interface::CGI::Output;
 use HTML::Template;
 use DBI;
+use C4::Koha;
 
 
 # this is a reorganisation of circulationold.pl
@@ -119,7 +120,7 @@ my ($template, $borrowernumber, $cookie)
                                                        query => $query,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {parameters => 1},
+                            flagsrequired => {circulate => 1},
                          });
 $template->param(headerbackgroundcolor => $headerbackgroundcolor,
                                                        backgroundimage => $backgroundimage,
@@ -131,7 +132,11 @@ $template->param(headerbackgroundcolor => $headerbackgroundcolor,
                                                        branchloop => \@branchloop
                                                        );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+my $branchcookie=$query->cookie(-name => 'branch', -value => "$branch", -expires => '+1y');
+my $printercookie=$query->cookie(-name => 'printer', -value => "$printer", -expires => '+1y');
+
+my $cookies=[$cookie,$branchcookie, $printercookie]; 
+output_html_with_http_headers $query, $cookies, $template->output;
 
 
 # Local Variables: