From bf5fb01d32a69bdcc41e0903fa51fda658d8e926 Mon Sep 17 00:00:00 2001 From: acli Date: Thu, 6 Feb 2003 05:10:54 +0000 Subject: [PATCH] Make sure flagsrequired is *circulate* not parameters --- circ/branchtransfers.pl | 2 +- circ/circulation.pl | 19 ++++++++++++------- circ/returns.pl | 2 +- circ/selectbranchprinter.pl | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 899e31eafe..93f8834d4b 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -251,7 +251,7 @@ my ($template, $borrowernumber, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {circulate => 1}, }); $template->param( genbrname => $genbrname, genprname => $genprname, diff --git a/circ/circulation.pl b/circ/circulation.pl index 2cb68ab4ea..d7f2e144c2 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -30,15 +30,24 @@ use C4::Output; use C4::Print; use DBI; use C4::Auth; +use C4::Interface::CGI::Output; my $query=new CGI; -my ($loggedinuser, $sessioncookie, $sessionID) = checkauth($query); +my ($loggedinuser, $sessioncookie, $sessionID) = checkauth + ($query, 0, { circulate => 1 }); + +#my ($template, $loggedinuser, $sessioncookie) = get_template_and_user +# ({ +# template_name => 'circ/circulation.tmpl', +# query => $query, +# type => "intranet", +# authnotrequired => 0, +# flagsrequired => { circulate => 1 }, +# }); my %env; my $headerbackgroundcolor='#99cc33'; -my $circbackgroundcolor='#ffffcc'; # FIXME - Never used -my $circbackgroundcolor='white'; # FIXME - Never used my $linecolor1='#ffffcc'; my $linecolor2='white'; my $backgroundimage="/images/background-mem.gif"; @@ -46,8 +55,6 @@ my $backgroundimage="/images/background-mem.gif"; my $branches = getbranches(); my $printers = getprinters(\%env); -my $query = new CGI; - my $branch = getbranch($query, $branches); my $printer = getprinter($query, $printers); @@ -66,8 +73,6 @@ $env{'printer'}=$printer; $env{'queue'}=$printer; my @datearr = localtime(time()); -my $tday = localtime(time()); # FIXME - Unused -#warn "today: $tday \n"; # FIXME - Could just use POSIX::strftime("%Y%m%d", localtime); my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", ($datearr[3])); #warn $todaysdate; diff --git a/circ/returns.pl b/circ/returns.pl index 5b559f7e6f..a0a69aae69 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -43,7 +43,7 @@ my ($template, $borrowernumber, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {circulate => 1}, }); ##################### diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 147bce5504..28fbf5ba05 100644 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -119,7 +119,7 @@ my ($template, $borrowernumber, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {circulate => 1}, }); $template->param(headerbackgroundcolor => $headerbackgroundcolor, backgroundimage => $backgroundimage, -- 2.39.5