X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=serials%2Fsubscription-renew.pl;h=219fca7ed2ec8d42d316421f33904c16606cacf2;hb=0a21cd9b817d671945da49298560d36ad4ed55cd;hp=72b101b76e0488cb7df291a3d628876bd1f677cc;hpb=a5746c616a1ee15b80614ce0de81d6c415236319;p=koha.git diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl index 72b101b76e..219fca7ed2 100755 --- a/serials/subscription-renew.pl +++ b/serials/subscription-renew.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -# WARNING: 4-character tab stops here # Copyright 2000-2002 Katipo Communications # @@ -45,12 +44,12 @@ Id of the subscription this script has to renew =cut use strict; -require Exporter; +use warnings; + use CGI; use C4::Koha; use C4::Auth; -use C4::Dates; - +use C4::Dates qw/format_date/; use C4::Context; use C4::Auth; use C4::Output; @@ -69,7 +68,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => { serials => 1 }, + flagsrequired => { serials => 'renew_subscription' }, debug => 1, } ); @@ -80,14 +79,14 @@ if ( $op eq "renew" ) { $query->param('startdate'), $query->param('numberlength'), $query->param('weeklength'), $query->param('monthlength'), $query->param('note') - ); + ); } my $subscription = GetSubscription($subscriptionid); if ($subscription->{'cannotedit'}){ warn "Attempt to renew subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed"; print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid"); -} +} $template->param( startdate => format_date( @@ -100,12 +99,8 @@ $template->param( subscriptionid => $subscriptionid, bibliotitle => $subscription->{bibliotitle}, $op => 1, - popup => ($query->param('mode')eq "popup"), + popup => ($query->param('mode')eq "popup"), ); # Print the page output_html_with_http_headers $query, $cookie, $template->output; - -# Local Variables: -# tab-width: 4 -# End: